private void MainWindow_SizeChanged(object sender, SizeChangedEventArgs e) { // percentage left and right panel var desiredPanelWidth = this.ActualWidth * 0.15; LeftPanel.Width = Math.Max(desiredPanelWidth, LeftPanel.MinWidth); RightPanel.Width = Math.Max(desiredPanelWidth, RightPanel.MinWidth); LeftPanel.UpdateLayout(); RightPanel.UpdateLayout(); if (_leftPanelHidden) { LeftPanel.Margin = new Thickness( -MWLeftPanelTabControl.ActualWidth, LeftPanel.Margin.Top, LeftPanel.Margin.Right, LeftPanel.Margin.Bottom); } if (_rightPanelHidden) { RightPanel.Margin = new Thickness( RightPanel.Margin.Left, RightPanel.Margin.Top, -MWRightPanelStackPanel.ActualWidth, RightPanel.Margin.Bottom); } // scale assets RepaintTrackRenderer(); }
private void ShowIdleScreen() { // pictureBox1.BackgroundImage = aSlideShow[0]; pictureBox1.Show(); RightPanel.Hide(); CustDGView.Hide(); }
public void Update() { if (needsCameraUpdate) { needsCameraUpdate = false; UpdateCameraOffset(); } runButton.Update(); menuButton.Update(); addStatButton.Update(); addSkillButton.Update(); if (IsLeftPanelVisible) { LeftPanel.Update(); leftPanelFrame.Update(); } if (IsRightPanelVisible) { RightPanel.Update(); rightPanelFrame.Update(); } if (!IsLeftPanelVisible || !IsRightPanelVisible) { minipanel.Update(); } }
void DoChangePanel(object state) { // remember which tab we were on int topTabIndex = this.advancedControlsTabControl.SelectedTabIndex; // remove the advance control and replace it with new ones build for the selected printer int advancedControlsWidgetIndex = RightPanel.GetChildIndex(this.advancedControlsTabControl); RightPanel.RemoveChild(advancedControlsWidgetIndex); this.advancedControlsTabControl = CreateNewAdvancedControlsTab(sliceSettingsUiState); RightPanel.AddChild(this.advancedControlsTabControl, advancedControlsWidgetIndex); // set the selected tab back to the one it was before we replace the control this.advancedControlsTabControl.SelectTab(topTabIndex); // This is a hack to make the pannel remain on the screen. It would be great to debug it and understand // why it does not work without this code in here. RectangleDouble localBounds = this.LocalBounds; this.LocalBounds = new RectangleDouble(0, 0, this.LocalBounds.Width - 1, 10); this.LocalBounds = localBounds; OnAdvancedControlsLoaded(); }
private void DrawLine() { Graphics graphic = RightPanel.CreateGraphics(); graphic.Clear(RightPanel.BackColor); DrawLine(graphic); }
private async void HideRightPanel() { if (RightPanel != null) { _rightSwipeGesture.TranslationX = 0; await RightPanel.TranslateTo(0, RightPanel.TranslationY, SpeedAnimatePanel, Easing.CubicOut); } }
public MainPage() : base(PanelSetEnum.psLeftRight) { #region right menu var btnRightMenuShow = new Button { Text = "Right menu show", }; btnRightMenuShow.Clicked += (s, e) => { IsShowRightPanel = !IsShowRightPanel; }; //add button to main layout on page ContentLayout.Children.Add(btnRightMenuShow); //set width for right panel RightPanelWidth = 150; //add label to main layout on right panel RightPanel.AddToContext( new StackLayout { Padding = new Thickness(32), Children = { new Label { Text = "right menu", TextColor = Color.Red, } } }); RightPanel.BackgroundColor = Color.Blue; #endregion #region left menu var btnLeftMenuShow = new Button { Text = "Left menu show", }; btnLeftMenuShow.Clicked += (s, e) => { IsShowLeftPanel = !IsShowLeftPanel; }; ContentLayout.Children.Add(btnLeftMenuShow); LeftPanel.BackgroundColor = Color.Yellow; LeftPanel.AddToContext( new StackLayout { Padding = new Thickness(32), Children = { new Label { Text = "left menu", TextColor = Color.Green, } } }); #endregion }
async private void HideRightPanel() { if (RightPanel != null) { rightSwipeGesture.TranslateTo(0, rightSwipeGesture.TranslationY, SpeedAnimatePanel, Easing.CubicOut); //ContentLayout.FadeTo(1, SpeedAnimatePanel, Easing.CubicOut); await RightPanel.TranslateTo(0, RightPanel.TranslationY, SpeedAnimatePanel, Easing.CubicOut); } }
public void Init(RightPanel controller, BasePool pool, Field field, bool received = false) { listingsPool = pool; rightPanel = controller; tradeField = field; removeButton.gameObject.SetActive(!received); nameText.text = tradeField.GetFieldName(); }
public void EnterClearly() { Anim.Play("Creator_ShowWorkspace"); LeftCreatingPanel.SetActive(true); LeftMainPanel.SetActive(false); RightPanel.SetActive(true); RedLine.SetActive(true); Table.CleanBeforeInit(); Table.Initialize(); }
private void SubtitlesIcon_MouseUp(object sender, MouseButtonEventArgs e) { RightPanel.Visibility = Hider.Visibility = Visibility.Visible; var sb = ((Storyboard)FindResource("OpacityUp")); sb.Begin(RightPanel); ThicknessAnimation thicc = new ThicknessAnimation(new Thickness(0), new TimeSpan(0, 0, 0, 0, 300)); RightPanel.BeginAnimation(MarginProperty, thicc); }
private async void ShowRightPanel() { IsShowLeftPanel = false; if (RightPanel != null) { _rightSwipeGesture.TranslationX = -RightPanelWidth; await RightPanel.TranslateTo(-RightPanelWidth, RightPanel.TranslationY, SpeedAnimatePanel, Easing.CubicOut); } }
private void TeamsForm_SizeChanged(object sender, EventArgs e) { if ((this.Height > 640)) // Maximized { // Panels RightBackPanel.Size = new Size(118, 0); SearchPanel.Show(); PartionPanel.Hide(); MemberGrid.Show(); if (Person == "Admin") { TeamGrid.Dock = DockStyle.Left; // Make TeamGrid Dock Left PartionPanel.Show(); UpdateIconButton.Hide(); DeleteIconButton.Location = new Point(11, 62); } else if (ButtonPressed == 0) // Show all Teams Head/Non-Head Member { RightPanel.Hide(); } else if (ButtonPressed == 1) { if (Person == "Head") // Show My Team of Head-Member { RightPanel.Show(); UpdateIconButton.Hide(); DeleteIconButton.Location = new Point(11, 62); } else // Show My Team of Non-Head-Member { RightPanel.Hide(); } } } else // Restored { // Panels RightBackPanel.Size = new Size(136, 0); PartionPanel.Hide(); SearchPanel.Hide(); MemberGrid.Hide(); TeamGrid.Dock = DockStyle.Fill; // Make TeamGrid Dock Fill so it occupy all remaining form if (Person == "Admin") // Admin Case { UpdateIconButton.Show(); DeleteIconButton.Location = new Point(11, 104); } else // All other Possible Cases { RightPanel.Hide(); } } }
private void exportItem_Click(object sender, EventArgs e) { SaveFileDialog exportImageDialog = new SaveFileDialog(); exportImageDialog.Filter = "JPeg Image|*.jpg|Bitmap Image|*.bmp|Gif Image|*.gif|Png Image|*.png"; exportImageDialog.Title = "Save an Image File"; if (exportImageDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) { if (String.IsNullOrWhiteSpace(exportImageDialog.FileName)) { MessageBox.Show("파일 이름이 비어있습니다."); } else { System.IO.FileStream fs = (System.IO.FileStream)exportImageDialog.OpenFile(); using (Bitmap bitmap = new Bitmap(RightPanel.ClientSize.Width, RightPanel.ClientSize.Height)) { RightPanel.DrawToBitmap(bitmap, RightPanel.ClientRectangle); using (var graphics = Graphics.FromImage(bitmap)) { DrawLine(graphics); } foreach (Control control in RightPanel.Controls) { if (control is GroupBox) { GroupBox groupBox = (GroupBox)control; Rectangle rac = new Rectangle(groupBox.Bounds.X, groupBox.Bounds.Y, groupBox.Width, groupBox.Height); groupBox.DrawToBitmap(bitmap, rac); } } switch (exportImageDialog.FilterIndex) { case 1: bitmap.Save(fs, System.Drawing.Imaging.ImageFormat.Jpeg); break; case 2: bitmap.Save(fs, System.Drawing.Imaging.ImageFormat.Bmp); break; case 3: bitmap.Save(fs, System.Drawing.Imaging.ImageFormat.Gif); break; case 4: bitmap.Save(fs, System.Drawing.Imaging.ImageFormat.Png); break; } } fs.Close(); } } }
public void RightPanelState(bool state) { if (state) { RightPanel.GetComponent <PanelAnimator>().GoEnd(); } else { RightPanel.GetComponent <PanelAnimator>().GoStart(); } }
private void CreateRightGrid() { if (RightPanel != null) { var rightGrid = GdiMapper.ToGdiGrid(ChartGridModel); rightGrid.CellSize = CellSize; rightGrid.Size = RightPanel.Size; RightPanel.AddChild(rightGrid); } }
async private void ShowRightPanel() { IsShowLeftPanel = false; if (RightPanel != null) { rightSwipeGesture.TranslateTo(0 - _rightPanelWidth, rightSwipeGesture.TranslationY, SpeedAnimatePanel, Easing.CubicOut); //ContentLayout.FadeTo(0.5, SpeedAnimatePanel, Easing.CubicOut); await RightPanel.TranslateTo(0 - _rightPanelWidth, RightPanel.TranslationY, SpeedAnimatePanel, Easing.CubicOut); } }
private void ChangeImages() { if (RightPanel.Controls.Count > 0) { foreach (MetroTile tile in RightPanel.Controls) { tile.TileImage = UiSettings.ResizedImage(TileSize, TileSize); Application.DoEvents(); } } RightPanel.Refresh(); }
private void DownloadWindow(object sender, RoutedEventArgs e) { if (RightPanel.Visibility == Visibility.Visible) { RightPanel.Visibility = Visibility.Collapsed; } else { RightPanel.Navigate(typeof(DownloadList)); RightPanel.Visibility = Visibility.Visible; } }
public MembersForm(char Person) { InitializeComponent(); PopulateGrid("SELECT * FROM Familia_MembersData"); if (Person == 'M') { RightPanel.Hide(); MemberGrid.Columns[7].Visible = false; // Members Password Restrictions. HidenPanel.Size = new Size(17, 0); } }
private void HideSideBar_MouseUp(object sender, MouseButtonEventArgs e) { var sb = ((Storyboard)FindResource("OpacityDown")).Clone(); sb.Completed += (s, ev) => { RightPanel.Visibility = Hider.Visibility = Visibility.Hidden; }; sb.Begin(RightPanel); ThicknessAnimation thicc = new ThicknessAnimation(new Thickness(0, 0, -250, 0), new TimeSpan(0, 0, 0, 0, 300)); RightPanel.BeginAnimation(MarginProperty, thicc); }
public void BackToLobby() { Anim.Play("Creator_HideWorkspace"); LeftCreatingPanel.SetActive(false); LeftMainPanel.SetActive(true); RightPanel.SetActive(false); RedLine.SetActive(false); Table.IsActive = false; LoadBtn.interactable = false; LoadList(); }
void InitOverlays() { LeftPanel = InstantiateChild <LMS_GuiBaseBox2D>(new LMS_GuiConfig() { Rect = new Rect(8f, 41f, 486f, 587f) }, 100000); LeftPanel.SetTexture((int)E_Texture.IDLE, LMS_GuiBaseUtils.NextGrade(m_Skin.box.normal.background)); RightPanel = InstantiateChild <LMS_GuiBaseBox2D>(new LMS_GuiConfig() { Rect = new Rect(197f, 41f, 705f, 587f) }, 100000); RightPanel.SetTexture((int)E_Texture.IDLE, LMS_GuiBaseUtils.NextGrade(m_Skin.box.normal.background)); }
void OnEnable() { tex_bg = Resources.Load <Texture2D> ("GUISkin/Grid"); lst_chars.Add(new Character(this, "N/A", 7)); coordinate = Vector2.zero; colorWindow = new ColorWindow(); leftPanel = new LeftPanel(this); rightPanel = new RightPanel(this); GUISkin mySkin = Resources.Load <GUISkin> ("GUISkin/NodeSkin"); style_button = mySkin.GetStyle("button"); CreateNode(Vector2.zero, 0); //Selection.selectionChanged = LoadStoryAsset; }
private void Copy() { try { string file = LeftPanel.File.file; string filePath = Path.GetFileName(file); string destination = RightPanel.path + '\\' + filePath; LeftPanel.File = null; File.Copy(file, destination, true); } catch { } LeftPanel.Reload(LeftPanel.path); RightPanel.Reload(RightPanel.path); }
public CtlShortcut(ChatDesk desk, RightPanel rp) { this._isDoubleClick = false; this._doubleClickTime = DateTime.MinValue; this._needInitTvSearch = true; this._prvSearchMouseDownTime = DateTime.MinValue; this._pubSearchMouseDownTime = DateTime.MinValue; this.InitializeComponent(); this._desk = desk; this._rightPanel = rp; this._seller = this._desk.Seller; this.SetContentVisible(); this.InitTabControl(null, null, null); this.LoadDatas(); this.SetTitleButtonsVisible(); this.ShowTitleButtons(); }
private void RightPanel_DragEnter(object sender, DragEventArgs e) { Point p = PointToClient(new Point(e.X, e.Y)); Control ctrl = e.Data.GetData(e.Data.GetFormats(true)[0]) as Control; if (ctrl is R_ListCell) { e.Effect = DragDropEffects.Move; rec = new Rectangle(0, p.Y - 2, RightPanel.Width, 4); onDrag = true; RightPanel.Refresh(); } else { e.Effect = DragDropEffects.None; } }
public void EnterWithFile() { string fileName = FileButtons[CurrentListIndex].gameObject.GetComponentInChildren <Text>().text; if (Table.ReadFromTWx(CurrentFilePath, fileName.Substring(0, fileName.Length - 4))) { Anim.Play("Creator_ShowWorkspace"); LeftCreatingPanel.SetActive(true); LeftMainPanel.SetActive(false); RightPanel.SetActive(true); RedLine.SetActive(true); Table.Initialize(); } else { MessageBox.Show(LocaleManager.instance.GetLocaleText("error_occured"), LocaleManager.instance.GetLocaleText("creator_cannotload"), MessageBoxButton.OK); } }
private void CopyExecute(object obj) { string source = ""; string target = ""; if (LeftPanel.SelectedPath != null) { source = Path.Combine(LeftPanel.CurrentPath, LeftPanel.GetCorrectSelectedPath()); target = Path.GetFullPath(RightPanel.CurrentPath); } else if (RightPanel.SelectedPath != null) { source = Path.Combine(RightPanel.CurrentPath, RightPanel.GetCorrectSelectedPath()); target = Path.GetFullPath(LeftPanel.CurrentPath); } _model.Copy(source, target); // Model usage UpdateCurrentPathContents(); // Updating view }
public void Render() { if (IsLeftPanelVisible) { LeftPanel.Render(); leftPanelFrame.Render(); } if (IsRightPanelVisible) { RightPanel.Render(); rightPanelFrame.Render(); } // Render the background bottom bar renderWindow.Draw(panelSprite, 0, new Point(0, 600)); renderWindow.Draw(panelSprite, 1, new Point(166, 600)); renderWindow.Draw(panelSprite, 2, new Point(294, 600)); renderWindow.Draw(panelSprite, 3, new Point(422, 600)); renderWindow.Draw(panelSprite, 4, new Point(550, 600)); renderWindow.Draw(panelSprite, 5, new Point(685, 600)); // Render the health bar renderWindow.Draw(healthManaSprite, 0, new Point(30, 587)); renderWindow.Draw(gameGlobeOverlapSprite, 0, new Point(28, 595)); // Render the mana bar renderWindow.Draw(healthManaSprite, 1, new Point(692, 588)); renderWindow.Draw(gameGlobeOverlapSprite, 1, new Point(693, 591)); if (!IsLeftPanelVisible || !IsRightPanelVisible) { minipanel.Render(); } runButton.Render(); menuButton.Render(); addStatButton.Render(); addSkillButton.Render(); }