public void SetBackGroud() { try { if (this.BackGround.Contains(".")) { if (!this.BackGround.Contains("pack://application:,,,")) { this.BackGround = string.Format("pack://application:,,,{0}", this.BackGround); } ImageBrush brush1 = new ImageBrush { ImageSource = new BitmapImage(new Uri(this.BackGround)) }; base.Background = brush1; } else { base.Background = new BrushConverter().ConvertFromInvariantString(this.BackGround) as Brush; } } catch (Exception ex) { OpenWindows.Prompt(ex.CreateErrorMsg()); } }
private void Add_Click(string Name) { try { char[] trimChars = new char[] { ',' }; this.type = this.type.TrimEnd(trimChars); MESSAGE message = new MESSAGE(); if (string.IsNullOrEmpty(this.type)) { OpenWindows.Prompt(message.FeedbackTypeIsNull); } else if (string.IsNullOrEmpty(this.Description.Text)) { OpenWindows.Prompt(message.DescriptionNotNull); } else { this.model.Type = this.type; this.model.Description = this.Description.Text; if (UserActionUtils.WriteFeedback(this.model)) { base.Close(); } } } catch { } }
private static void ProcessTown() { var kadalaItem = Kadala.GetSelectedItem(); if (kadalaItem != Kadala.Items.NONE && OpenWindows.IsKadalaNewOpened()) { Kadala.GambleItem(kadalaItem); } if (Smith.ShouldSalvage() && OpenWindows.IsSmithNewOpened()) { Smith.SalvageNormals(); } int urshiUp = Urshi.GetUpgradeCount(); if (urshiUp > 0 && OpenWindows.IsUrshiNewOpened()) { Urshi.Upgrade(urshiUp); } if (Orek.ShouldOpen() && OpenWindows.IsOrekNewOpened()) { Orek.Open(); } if (ConfirmDialog.ShouldAccept() && OpenWindows.IsConfirmDialogNewOpened()) { ConfirmDialog.Accept(); } }
public override void OnInspectorGUI() { //EditorGUILayout.BeginHorizontal(); //EditorGUILayout.EndHorizontal(); if (GUILayout.Button("load map")) { OpenFileName ofn = new OpenFileName(); ofn.structSize = Marshal.SizeOf(ofn); ofn.filter = "All Files\0*.*\0\0"; ofn.file = new string(new char[256]); ofn.maxFile = ofn.file.Length; ofn.fileTitle = new string(new char[64]); ofn.maxFileTitle = ofn.fileTitle.Length; ofn.initialDir = Application.dataPath; //默认路径 ofn.title = "Open Project"; ofn.defExt = "bin"; //显示文件的类型 //注意 一下项目不一定要全选 但是0x00000008项不要缺少 ofn.flags = 0x00080000 | 0x00001000 | 0x00000800 | 0x00000200 | 0x00000008; //OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_PATHMUSTEXIST| OFN_ALLOWMULTISELECT|OFN_NOCHANGEDIR if (OpenWindows.GetOpenFileName(ofn)) { navTools.LoadMap(ofn.file); } } if (GUILayout.Button("test navmesh")) { navTools.StartNavTest(); } }
private void Feedback_Click(object sender, RoutedEventArgs e) { BACAClient.Model.Feedback model = new BACAClient.Model.Feedback { PageName = this.PageName }; OpenWindows.Feedback(model); }
private void _Click(string Name) { string text = this.Time.Text; if (!string.IsNullOrEmpty(text) && ConfigerHelper.SetAppSettingsConfig(new ConfigerParameterName().HistorySaveDays, text)) { OpenWindows.Prompt("设定成功"); base.Close(); } }
protected void OnViewModelClosing(object sender, EventArgs e) { IViewModel viewModel = (IViewModel)sender; OpenWindows.Remove(viewModel); if (viewModel == CurrentWindow) { CurrentWindow = OpenWindows.FirstOrDefault() ?? defaultWindow; } }
private void Feedback_Click(object sender, RoutedEventArgs e) { BACAClient.Model.Feedback model = new BACAClient.Model.Feedback { PageName = "快速检索", SearchType = this.RadioButtonCheck(2), SearchInfo = this.keyword.Text }; OpenWindows.Feedback(model); }
private void Collection_Click(string Name) { if (string.IsNullOrEmpty(this.users.UserId)) { OpenWindows.Prompt(new MESSAGE().NotLogin); } else { UserActionUtils.WriteCollection(this.users.UserId, this.model); } }
/// <summary> /// 登录按钮 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void BtnLogin_Click(object sender, RoutedEventArgs e) { if (cmbUserName.SelectedItem.ToString() == "Admin" && pwUserPassword.Password == "123456") { OpenWindows.OpenWPF(10); OpenWindows.MiniWPF("WPFMain"); } else { MessageBox.Show("密码错误!请输入正确的密码!"); } }
private void Feedback_Click(object sender, RoutedEventArgs e) { BACAClient.Model.Feedback model = new BACAClient.Model.Feedback { PageName = this.tRetrieve.PageName, SearchType = ((ComboxItem)this.Type.SelectedItem).Text, SearchInfo = this.keyword.Text, Category = this.GetCategoryID(false), PageIndex = this.pageIndex }; OpenWindows.Feedback(model); }
private void Feedback_Click(object sender, RoutedEventArgs e) { BACAClient.Model.Feedback model = new BACAClient.Model.Feedback { TypeID = this.model.TypeId.ToString(), LngId = this.model.LngId.ToString(), Knowledge = this.fulltextxml.Name, NodeName = this.NodeName, PageName = "详细信息" }; OpenWindows.Feedback(model); }
private void Delete_Click(object sender, RoutedEventArgs e) { BACAClient.Model.Collection model = new BACAClient.Model.Collection { UserID = this.UserId, LngId = this.model.LngId, TypeID = this.model.TypeId }; MESSAGE message = new MESSAGE(); OpenWindows.Prompt(message.RemoveSuccess); this.Refresh(); }
private void Icon_Click(string Name) { try { this.CloseWindows(); string str = Name.ToLower(); if (!(str == "close")) { if (str == "max") { goto Label_004E; } if (str == "min") { goto Label_0057; } if (str == "menubutton") { goto Label_0060; } } else { ApplicationInfo.CloseApplication(); } return; Label_004E: this.LayOut(); return; Label_0057: this.HideOrShow(); return; Label_0060: if (this.Menu.IsOpen) { this.Menu.IsOpen = false; } else { this.Menu.IsOpen = true; } } catch (Exception ex) { OpenWindows.Prompt(ex.CreateErrorMsg()); } }
private void DeleteAll_Click(string Name) { TypeInitialization initialization = new TypeInitialization(); BACAClient.Model.Collection model = new BACAClient.Model.Collection { UserID = this.model.UserId, TypeID = initialization.INT, LngId = initialization.INT }; MESSAGE message = new MESSAGE(); OpenWindows.Prompt(message.RemoveSuccess); }
private void DeleteOne_Click(string Name) { this.IsOpen = false; MESSAGE message = new MESSAGE(); string data = string.Empty; //if (new LocalHistoryUtils().RemoveChildNodes(this.model)) //{ // data = message.RemoveSuccess; // this.gotokdp(null, this.Index); //} //else //{ // data = message.RemoveError; //} OpenWindows.Prompt(data); }
private void Menu_Click(object sender, RoutedEventArgs e) { var mi = sender as MenuItem; string type = mi.Header.ToString(); Menu menu = mi.Parent as Menu; string str2 = type; if (!(str2 == "显示悬浮框")) { if (str2 == "隐藏悬浮框") { ShowEvent.ShowOrHideWindow(new Flash().Title); this.Menu1.Header = "显示悬浮框"; } else if (str2 == "关 于" || str2 == "版本信息") { OpenWindows.About(); } else { this.RapidAndType(type); } } else { if (!ShowEvent.ShowOrHideWindow(new Flash().Title)) { new Flash().Show(); } this.Menu1.Header = "隐藏悬浮框"; } if (str2 == "切换账号") { OpenWindows.Logon(); } if (str2 == "设置") { OpenWindows.SettingProfile(); } this.Menu.IsOpen = false; this.h1pop.IsOpen = false; this.h2pop.IsOpen = false; }
/// <summary> /// 打开报警窗口 50 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void BtnAlarm_Click(object sender, RoutedEventArgs e) { OpenWindows.OpenWPF(50); OpenWindows.MiniWPF("WPFAlarm"); }
/// <summary> /// 打开信号窗口 40 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void BtnSignals_Click(object sender, RoutedEventArgs e) { OpenWindows.OpenWPF(40); OpenWindows.MiniWPF("WPFSignals"); }
/// <summary> /// 打开手动窗口 20 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void BtnMannal_Click(object sender, RoutedEventArgs e) { OpenWindows.OpenWPF(20); OpenWindows.MiniWPF("WPFManual"); }
//=======================OpenWindows================================================================= /// <summary> /// 打开主窗口 10 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void BtnMain_Click(object sender, RoutedEventArgs e) { OpenWindows.OpenWPF(10); OpenWindows.MiniWPF("WPFMain"); }
/// <summary> /// 打开自动窗口 30 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void BtnAuto_Click(object sender, RoutedEventArgs e) { OpenWindows.OpenWPF(30); OpenWindows.MiniWPF("WPFAuto"); }
private void _lnkSwitchUser_Click(object sender, RoutedEventArgs e) { OpenWindows.Logon(); }
protected bool Equals(IDEStateEvent other) { return(base.Equals(other) && IDELifecyclePhase == other.IDELifecyclePhase && OpenWindows.SequenceEqual(other.OpenWindows) && OpenDocuments.SequenceEqual(other.OpenDocuments)); }
private void _Click(object sender, MouseButtonEventArgs e) { OpenWindows.Announcement(this.model); }