예제 #1
0
 public static void changeSelectCtrlAndFile(MainWindow pW, string path, string baseId)
 {
     if (File.Exists(path))
     {
         //todo
     }
     else
     {
         Public.ResultLink.createResult("\r\n文件:\"" + path + "\"不存在,请检查路径。", Public.ResultType.RT_WARNING);
     }
 }
예제 #2
0
 static void viewPrevFile(MainWindow pW)
 {
     if (pW.mx_workTabs.Items.Count > 1)
     {
         if (pW.mx_workTabs.SelectedIndex > 0)
         {
             pW.mx_workTabs.SelectedItem = pW.mx_workTabs.Items.GetItemAt(pW.mx_workTabs.SelectedIndex - 1);
         }
         else
         {
             pW.mx_workTabs.SelectedItem = pW.mx_workTabs.Items.GetItemAt(pW.mx_workTabs.Items.Count - 1);
         }
     }
 }
예제 #3
0
        public MainWindow()
        {
            s_pW = this;
            Project.Setting.s_skinPath = "";
            Project.Setting.s_projPath = "";
            m_msgMng = new MsgManager(true);
            m_mapIncludeFiles = new Dictionary<string, IncludeFile>();
            m_mapOpenedFiles = new Dictionary<string, OpenedFile>();
            m_strDic = new StringDic("zh-CN", conf_pathStringDic);
            m_isCanEdit = true;
            m_tLast = 0;
            m_hitCount = 0;
            mx_skinEditor = new SkinEditor();
            mt_status0 = "";
            mt_status1 = "";
            mt_status2 = "";
            mt_status3 = "";
            //system("taskkill /im conhost.exe /f");

            InitializeComponent();

            initData();

            OpenedFile.s_paraResult = new Paragraph();
            ResultLink.s_curResultFrame = OpenedFile.s_paraResult;
            m_isLoadOver = true;
            this.DataContext = this;

            mb_status0 = "就绪";
            m_screenWidth = 960;
            m_screenHeight = 540;
            m_isMoba = false;
            m_screenWidthBasic = 960;
            m_screenHeightBasic = 540;
            m_dpiSysX = 96.0f;
            m_dpiSysY = 96.0f;
            m_curFile = "";
            m_vCtrlName = true;
            m_vCtrlId = true;
            m_mapXeSel = new Dictionary<XmlElement, BoloUI.SelButton>();
            mx_treeFrame.Items.Add(mx_skinEditor);

            m_xdTest = new XmlDocument();
            // w=\"400\" h=\"300\"
            m_strTestXml = "<label dock=\"4\" baseID=\"testCtrl\" text=\"测试Test\"/>";

            m_xdTest.LoadXml(m_strTestXml);
            m_xeTest = m_xdTest.DocumentElement;

            checkAndInitToolConfig();

            // hook keyboard 可能会报毒
            // 			IntPtr hModule = GetModuleHandle(IntPtr.Zero);
            // 			hookProc = new LowLevelKeyboardProcDelegate(LowLevelKeyboardProc);
            // 			hHook = SetWindowsHookEx(WH_KEYBOARD_LL, hookProc, hModule, 0);
            // 			if (hHook == IntPtr.Zero)
            // 			{
            // 				MessageBox.Show("Failed to set hook, error = " + Marshal.GetLastWin32Error());
            // 			}

            return;

            TcpListener server = new TcpListener(new System.Net.IPEndPoint(IPAddress.Parse("10.0.6.10"), 10088));
            server.Start(100);
            tcpClientConnected.Reset();
            IAsyncResult result = server.BeginAcceptTcpClient(new AsyncCallback(Acceptor), server);
            tcpClientConnected.WaitOne();
        }
예제 #4
0
 static void viewNextFile(MainWindow pW)
 {
     if (pW.mx_workTabs.Items.Count > 1)
     {
         if (pW.mx_workTabs.SelectedIndex < pW.mx_workTabs.Items.Count - 1)
         {
             pW.mx_workTabs.SelectedItem = pW.mx_workTabs.Items.GetItemAt(pW.mx_workTabs.SelectedIndex + 1);
         }
         else
         {
             pW.mx_workTabs.SelectedItem = pW.mx_workTabs.Items.GetItemAt(0);
         }
     }
 }