public MainWindow() { InitializeComponent(); instances = InitializeInstances(); Xml xml = new Xml(); ShortCut.init_shortcut(Strings.title); xml.Init_xml(); CheckUpdate.init_checkUpdate(); Init_minimize(); ModeCheck(); this.Descript_text.Text = Strings.title + " v" + ShortCut.myVersion; }
public MainWindow() { InitializeComponent(); ShortCut.init_shortcut("AntiRecall"); ShortCut.init_xml(); CheckUpdate.init_checkUpdate(); init_minimize(); if (ShortCut.CheckXml()) { QQPath.Text = ShortCut.QueryXml("QQPath"); PortText.Text = ShortCut.QueryXml("PortText"); } else { ShortCut.CreateXml(ShortCut.antiRElement); } }
/* * private void UpdateCount() * { * Regex re = new Regex("\\[\\d*\\]"); #if DEBUG * Console.WriteLine(count); #endif * Recall_Text.Text = re.Replace(Recall_Text.Text, "["+Convert.ToString(Math.Ceiling(count / 8))+"]"); * } * * public void ModifyRecallCount() * { * Recall_Text.Dispatcher.Invoke( * System.Windows.Threading.DispatcherPriority.Normal, * new TextChanger(UpdateCount)); * }*/ public MainWindow() { InitializeComponent(); ShortCut.init_shortcut("AntiRecall"); Xml.init_xml(); CheckUpdate.init_checkUpdate(); init_minimize(); if (Xml.CheckXml()) { Xml.antiRElement["PortText"] = Xml.QueryXml("PortText"); Xml.antiRElement["QQPath"] = Xml.QueryXml("QQPath"); Xml.antiRElement["Mode"] = Xml.QueryXml("Mode"); PortText.Text = Xml.antiRElement["PortText"]; } else { Xml.CreateXml(Xml.antiRElement); } ModeCheck(); this.Descript_text.Text = Xml.antiRElement["Descript"]; }
/* * private void UpdateCount() * { * Regex re = new Regex("\\[\\d*\\]"); #if DEBUG * Console.WriteLine(count); #endif * Recall_Text.Text = re.Replace(Recall_Text.Text, "["+Convert.ToString(Math.Ceiling(count / 8))+"]"); * } * * public void ModifyRecallCount() * { * Recall_Text.Dispatcher.Invoke( * System.Windows.Threading.DispatcherPriority.Normal, * new TextChanger(UpdateCount)); * }*/ public MainWindow() { InitializeComponent(); //ShortCut.init_shortcut("MoRecall"); Xml.init_xml(); CheckUpdate.init_checkUpdate(); init_minimize(); if (Xml.CheckXml()) { Xml.antiRElement["PortText"] = Xml.QueryXml("PortText"); Xml.antiRElement["PortText_Copy"] = Xml.QueryXml("PortText_Copy"); Xml.antiRElement["QQPath"] = Xml.QueryXml("QQPath"); Xml.antiRElement["TIMPath"] = Xml.QueryXml("TIMPath"); //Xml.antiRElement["NewUser"] = Xml.QueryXml("NewUser"); Xml.antiRElement["Mode"] = Xml.QueryXml("Mode"); PortText.Text = Xml.antiRElement["PortText"]; PortText_Copy.Text = Xml.antiRElement["PortText_Copy"]; } else { Xml.CreateXml(Xml.antiRElement); } Loaded += MainWindow_Loaded; this.jc.Foreground = System.Windows.Media.Brushes.Black; this.jc.IsEnabled = true; //if (Xml.antiRElement["NewUser"] == "new") //{ this.Descript_text.Content = "一个不修改文件的防撤回工具"; // } //else //{ // this.Descript_text.Content = "你好新用户"; //} ModeCheck(); }