public void RefreshImages() { if (ProjectManager.CurrentProject.Frames.Count > 0) { if (FrameSelectScale.Value >= 0 && FrameSelectScale.Value < ProjectManager.CurrentProject.Frames.Count && ProjectManager.CurrentProject.GetThumb(FrameSelectScale.Value) != null) { ThumbEditView.Image = WinFormHelper.ConvertToBitmap(ProjectManager.CurrentProject.GetThumbEdited((int)FrameSelectScale.Value)); ThumbViewGraph.Image = WinFormHelper.ConvertToBitmap(ProjectManager.CurrentProject.GetThumb((int)FrameSelectScale.Value)); FrameSelectLabel.Text = FrameSelectScale.Value.ToString(); } } else { ThumbEditView.Image = null; ThumbViewGraph.Image = null; ThumbViewList.Image = null; } }
public override WindowResponse Show() { if (DialogType == FileDialogType.SelectFolder) { fbdlg = new OpenFolderDialog(); fbdlg.InitialFolder = InitialDirectory; fbdlg.Title = Title; WindowResponse resp = WinFormHelper.GetResponse(fbdlg.ShowDialog(owner)); SelectedPath = fbdlg.Folder; return(resp); } else { switch (DialogType) { case FileDialogType.OpenFile: fdlg = new OpenFileDialog(); break; case FileDialogType.SaveFile: fdlg = new SaveFileDialog(); break; } fdlg.InitialDirectory = InitialDirectory; fdlg.Title = Title; string tmpFilter = string.Empty; foreach (FileTypeFilter filter in FileTypeFilters) { tmpFilter += filter.FilterName + "|"; for (int i = 0; i < filter.Filter.Length; i++) { tmpFilter += (i == 0 ? "" : ";") + "*." + filter.Filter[i]; } } fdlg.Filter = tmpFilter; WindowResponse resp = WinFormHelper.GetResponse(fdlg.ShowDialog()); SelectedPath = fdlg.FileName; return(resp); } }
public override WindowResponse Show(object parent, string message, string title, MessageWindowType type, MessageWindowButtons bType) { if (parent != null) { return(WinFormHelper.GetResponse(MessageBox.Show(message, title, WinFormHelper.GetButtons(bType), WinFormHelper.GetWinType(type)))); } else { return(WinFormHelper.GetResponse(MessageBox.Show((IWin32Window)parent, message, title, WinFormHelper.GetButtons(bType), WinFormHelper.GetWinType(type)))); } }