private static void SetThumbnailTitleAndIcon(UIElement content, IControlView activeView) { if (!_initialized) { throw new Exception("Not initialized"); } TabbedThumbnail thumbnail = TaskbarManager.Instance.TabbedThumbnail.GetThumbnailPreview(content); if (thumbnail != null && activeView != null) { if (thumbnail.Title != activeView.Header) //Title is not set yet or sth has changed { thumbnail.Title = activeView.Header; thumbnail.Tooltip = activeView.HeaderToolTip; var streamResourceInfo = Application.GetResourceStream(activeView.HeaderIcon); if (streamResourceInfo != null) { Stream iconStream = streamResourceInfo.Stream; var bitmap = new Bitmap(iconStream); var iconHandle = bitmap.GetHicon(); var icon = Icon.FromHandle(iconHandle); thumbnail.SetWindowIcon(icon); } RefreshPreview((Frame)content); } } }
public void ShowProgressDialog(IControlView view, string caption, string text) { frm = ProgressDlgFrm.Show(((Control)view).FindForm(), caption, text); frm.btnCancelar.Visible = suportsCancellation; frm.btnCancelar.Click += frmProgresso_BtnCancelar_OnClick; }
public void ShowProgressDialog(IControlView view, string caption, string text) { progressUC.TaskID = taskID; progressUC.Show(); progressUC.CancelEnabled = suportsCancellation; progressUC.CancelButtonClick += progressUC_CancelButton_Clicked; }
public SourceControlViewViewModel( VBE vbe, RubberduckParserState state, ISourceControlProviderFactory providerFactory, IFolderBrowserFactory folderBrowserFactory, ISourceControlConfigProvider configService, [Named("changesView")] IControlView changesView, [Named("branchesView")] IControlView branchesView, [Named("unsyncedCommitsView")] IControlView unsyncedCommitsView, [Named("settingsView")] IControlView settingsView, ICodePaneWrapperFactory wrapperFactory, IMessageBox messageBox) { _vbe = vbe; _state = state; _providerFactory = providerFactory; _folderBrowserFactory = folderBrowserFactory; _state.StateChanged += _state_StateChanged; _configService = configService; _config = _configService.Create(); _wrapperFactory = wrapperFactory; _messageBox = messageBox; _initRepoCommand = new DelegateCommand(_ => InitRepo()); _openRepoCommand = new DelegateCommand(_ => OpenRepo()); _cloneRepoCommand = new DelegateCommand(_ => ShowCloneRepoGrid()); _publishRepoCommand = new DelegateCommand(_ => ShowPublishRepoGrid()); _refreshCommand = new DelegateCommand(_ => Refresh()); _dismissErrorMessageCommand = new DelegateCommand(_ => DismissErrorMessage()); _showFilePickerCommand = new DelegateCommand(_ => ShowFilePicker()); _loginGridOkCommand = new DelegateCommand(_ => CloseLoginGrid(), text => !string.IsNullOrEmpty((string)text)); _loginGridCancelCommand = new DelegateCommand(_ => CloseLoginGrid()); _cloneRepoOkButtonCommand = new DelegateCommand(_ => CloneRepo(), _ => !IsNotValidCloneRemotePath); _cloneRepoCancelButtonCommand = new DelegateCommand(_ => CloseCloneRepoGrid()); _publishRepoOkButtonCommand = new DelegateCommand(_ => PublishRepo(), _ => !IsNotValidPublishRemotePath); _publishRepoCancelButtonCommand = new DelegateCommand(_ => ClosePublishRepoGrid()); TabItems = new ObservableCollection <IControlView> { changesView, branchesView, unsyncedCommitsView, settingsView }; SetTab(SourceControlTab.Changes); Status = RubberduckUI.Offline; ListenForErrors(); _fileSystemWatcher = new FileSystemWatcher(); }
public object AddMenuItem(string text, string name, IControlView view, EventHandler eventHandler) { var menuStrip = (MenuStrip)FindMenuStrip(view); var menu = menuStrip.Items.Add(text, null, eventHandler); menu.Name = name; return(menu); }
public ControlReportPresenter(IControlView view, IReportsService service, IReportManager reportManager) { ArgumentChecker.ThrowIfNull(view, "view"); ArgumentChecker.ThrowIfNull(service, "repository"); ArgumentChecker.ThrowIfNull(reportManager, "reportManager"); this.view = view; this.service = service; this.reportManager = reportManager; }
public DeviceListViewItem(IControlView device) { this.device = device; Name = device.Name; Text = device.Name; Group = new ListViewGroup("ChartBuilder"); SubItems.Add(new ListViewSubItem(this, " " + "WPF Toolkit")); SubItems.Add(new ListViewSubItem(this, " " + "Microsoft")); }
void IControlView.Show() { IControlView view = this; var dpInfo = new DockPanelSmartPartInfo(view.Name, ProfileName); dpInfo.Icon = Properties.Resources.Device; var workspace = BundleRuntime.Instance.GetFirstOrDefaultService <IWorkspace>(); workspace.Show(this, dpInfo); workspace.Activate(this); }
void Start() { model = new NaC_Model(); List <ICubeView> list = new List <ICubeView>(); GetComponentsInChildren(false, list); main = GetComponentInChildren <IControlView>(); presenter = new NaC_Presenter(list, model, main); Cursor.visible = true; Cursor.lockState = CursorLockMode.None; }
public void AddTabPage(string text, IControlView controlView) { TabPage tabPage = new TabPage(text); tabPage.Padding = new Padding(3); tabPage.UseVisualStyleBackColor = true; ((Control)controlView).Dock = DockStyle.Fill; tabPage.Controls.Add((Control)controlView); tabControl1.TabPages.Add(tabPage); tabControl1.SelectedTab = tabPage; // tabPage.Focus(); }
public NaC_Presenter(List <ICubeView> boardView, INaC_Model boardModel, IControlView mainView) { model = boardModel; model.BoardUpdated += model_BoardUpdated; cubeViews = boardView; foreach (ICubeView view in cubeViews) { view.FieldUpdated += view_FieldUpdated; view.UpdateField(model.GetField(view.GetField().x, view.GetField().y)); } main = mainView; main.ResetClicked += main_ResetClicked; }
public SourceControlViewViewModel( VBE vbe, ISourceControlProviderFactory providerFactory, IFolderBrowserFactory folderBrowserFactory, IConfigurationService <SourceControlConfiguration> configService, [Named("changesView")] IControlView changesView, [Named("branchesView")] IControlView branchesView, [Named("unsyncedCommitsView")] IControlView unsyncedCommitsView, [Named("settingsView")] IControlView settingsView, ICodePaneWrapperFactory wrapperFactory) { _vbe = vbe; _providerFactory = providerFactory; _folderBrowserFactory = folderBrowserFactory; _configService = configService; _config = _configService.LoadConfiguration(); _wrapperFactory = wrapperFactory; _initRepoCommand = new DelegateCommand(_ => InitRepo()); _openRepoCommand = new DelegateCommand(_ => OpenRepo()); _cloneRepoCommand = new DelegateCommand(_ => ShowCloneRepoGrid()); _refreshCommand = new DelegateCommand(_ => Refresh()); _dismissErrorMessageCommand = new DelegateCommand(_ => DismissErrorMessage()); _showFilePickerCommand = new DelegateCommand(_ => ShowFilePicker()); _closeLoginGridCommand = new DelegateCommand(_ => CloseLoginGrid()); _cloneRepoOkButtonCommand = new DelegateCommand(_ => CloneRepo(), _ => !IsNotValidRemotePath); _cloneRepoCancelButtonCommand = new DelegateCommand(_ => CloseCloneRepoGrid()); TabItems = new ObservableCollection <IControlView> { changesView, branchesView, unsyncedCommitsView, settingsView }; Status = RubberduckUI.Offline; ListenForErrors(); }
public virtual void AddControlViewAt(int index, IControlView view) { parentView.Controls.AddAt(index, (Control)view); }
public virtual void AddControlView(IControlView view, object controlCollection) { ((ControlCollection)controlCollection).Add((Control)view); }
public virtual void AddControlView(IControlView view) { parentView.Controls.Add((Control)view); }
internal static WebControlHelper CreateLocalInstance(IControlView view) { return(new WebControlHelper(view)); }
// public static T Instance // { // get { return Nested.instance; } // } public static WebControlHelper CreateInstance(IControlView view) { return(Nested.CreateLocalInstance(view)); }
public idoController(IControlView view, IIdoModel model) { this.contView = view; this.model = model; }
public void RunWorkerWithProgressDialog(IBackgroundWork backgroundWork, IControlView view, string caption, string text) { RunWorker(backgroundWork); ShowProgressDialog(view, caption, text); }
public virtual IControlHelper GetControlHelper(IControlView view) { return(new WinControlHelper(view)); }
public object FindMenuStrip(IControlView view) { return(WinControlFindHelper.FindControlOnChild <MenuStrip>((Control)view)); }
public object AddMenuItem(string text, string name, IControlView view) { return(AddMenuItem(text, name, view, null)); }
public void AddControlViewAt(int index, IControlView view) { parentView.Controls.Add((Control)view); }
public virtual void AddControlViewAt(int index, IControlView view, object controlCollection) { ((ControlCollection)controlCollection).AddAt(index, (Control)view); }
public virtual void RemoveControlView(IControlView view) { parentView.Controls.Remove((Control)view); }
public virtual object FindControlByNameOrID(IControlView view, string name, bool searchAllChildren) { return(FindControlByNameOrID((Control)view, name, searchAllChildren)); }
private WebControlHelper(IControlView view) { parentView = (TemplateControl)view; }
public T FindControlView <T>(IControlView view) where T : IControlView { return(WinControlFindHelper.FindControlOnChild <T>((Control)view)); }
public virtual void RemoveControlView(IControlView view, object controlCollection) { ((ControlCollection)controlCollection).Remove((Control)view); }
public virtual T FindControlView <T>(IControlView view) where T : IControlView { return(FindControl <T>((Control)view)); }