108 lines
3.0 KiB
C#
108 lines
3.0 KiB
C#
using Remontor.Connector;
|
|
using Remontor.History;
|
|
using Remontor.Setting;
|
|
using Remontor.Words;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Diagnostics;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Runtime.InteropServices;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
using static Remontor.Setting.SettingWordsControl;
|
|
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
|
|
|
namespace Remontor
|
|
{
|
|
public partial class Form1 : Form
|
|
{
|
|
|
|
public bool CloseOn = false;
|
|
public bool ShowOn = false;
|
|
|
|
public Form1()
|
|
{
|
|
SGlobalSetting.LoadSetting();
|
|
//WordsList.MainCategory = SGlobalSetting.LoadWords();
|
|
InitializeComponent();
|
|
barSessionControl1.hideTabHistory += flowContainer1.HideBar;
|
|
barSessionControl1.hideTabWords += flowContainerWords1.HideBar;
|
|
barSessionControl1.hideTabSetting += flowConteinerSetting1.HideBar;
|
|
SConnector.Panel = this.panel3;
|
|
SConnector.FormMain = this;
|
|
|
|
|
|
flowConteinerSetting1.settingWordsControl1.UpdateTree += flowContainerWords1.UpdateTree;
|
|
flowConteinerSetting1.UpdateTree += flowContainerWords1.UpdateTree;
|
|
flowConteinerSetting1.Save += flowContainerWords1.Save;
|
|
|
|
|
|
this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
|
|
|
|
|
|
}
|
|
|
|
private void FlowConteinerSetting1_Save()
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
[DllImport("user32.dll")]
|
|
static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent);
|
|
[DllImport("user32.dll")]
|
|
static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);
|
|
[DllImport("user32.dll")]
|
|
static extern bool MoveWindow(IntPtr Handle, int x, int y, int w, int h, bool repaint);
|
|
|
|
private void tabControl1_SizeChanged(object sender, EventArgs e)
|
|
{
|
|
SConnector.ResizeActiv();
|
|
|
|
}
|
|
|
|
protected override void WndProc(ref Message m)
|
|
{
|
|
if ((m.Msg == 0x210 && m.WParam.ToInt32() == 513) || m.Msg == 0x201)
|
|
{
|
|
Point clickPoint = this.PointToClient(Cursor.Position);
|
|
if (!flowContainerWords1.Bounds.Contains(clickPoint))
|
|
{
|
|
barSessionControl1.ShowBarSet(BarShow.HideBar);
|
|
}
|
|
|
|
}
|
|
base.WndProc(ref m);
|
|
}
|
|
|
|
private void Form1_Load(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void barSessionControl1_Load(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
private void Form1_Deactivate(object sender, EventArgs e)
|
|
{
|
|
barSessionControl1.ShowBarSet(BarShow.HideBar);
|
|
}
|
|
|
|
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
|
|
{
|
|
CloseOn = true;
|
|
flowContainerWords1.Save();
|
|
SGlobalSetting.SaveSettig();
|
|
|
|
}
|
|
}
|
|
}
|
|
|