void formMimic_DragDrop(object sender, DragEventArgs e) { if (e.Data.GetDataPresent(typeof(Client.Model.PresetModel))) { Client.Model.PresetModel presetData = null; if ((presetData = (Client.Model.PresetModel)e.Data.GetData(typeof(Client.Model.PresetModel))) != null) { clientPresenter.TriggerPreset(presetData); } } else if (e.Data.GetDataPresent(typeof(Client.Model.VncModel))) { Client.Model.VncModel vncData = null; if ((vncData = (Client.Model.VncModel)e.Data.GetData(typeof(Client.Model.VncModel))) != null) { presetHelper.AddTriggeredVNC(vncData); clientPresenter.TriggerVnc(vncData); } } else if (e.Data.GetDataPresent(typeof(Client.Model.WindowsModel))) { Client.Model.WindowsModel appData = null; if ((appData = (Client.Model.WindowsModel)e.Data.GetData(typeof(Client.Model.WindowsModel))) != null) { if ((appData.Style & Constant.WS_MINIMIZE) != 0) { // restore the window first clientPresenter.SetApplicationRestore(appData.WindowsId); } else { clientPresenter.SetApplicationForeground(appData.WindowsId); } } } else if (e.Data.GetDataPresent(typeof(Client.Model.ApplicationModel))) { Client.Model.ApplicationModel applicationData = null; if ((applicationData = (Client.Model.ApplicationModel)e.Data.GetData(typeof(Client.Model.ApplicationModel))) != null) { presetHelper.AddTriggeredApplication(applicationData); clientPresenter.TriggerApplication(applicationData); } } else if (e.Data.GetDataPresent(typeof(InputAttributes))) { InputAttributes attributeData = null; if ((attributeData = (InputAttributes)e.Data.GetData(typeof(InputAttributes))) != null) { presetHelper.AddTriggeredVisionInput(attributeData); clientPresenter.TriggerVisionInput(attributeData); } } }
private void AddWindow(Client.Model.WindowsModel wndPos) { holder.AddControl(new ControlAttributes { Id = wndPos.WindowsId, WindowName = wndPos.DisplayName, Xpos = wndPos.PosLeft, Ypos = wndPos.PosTop, Width = wndPos.Width, Height = wndPos.Height, Style = wndPos.Style, ZOrder = wndPos.ZOrder }); }
private void ChangeWindowZOrder(Client.Model.WindowsModel wndPos) { holder.ChangeControlZOrder(wndPos.WindowsId, wndPos.ZOrder); }
private void ChangeWindowStyle(Client.Model.WindowsModel wndPos) { holder.ChangeControlStyle(wndPos.WindowsId, wndPos.Style); }
private void ChangeWindowSize(Client.Model.WindowsModel wndPos) { holder.ChangeControlSize(wndPos.WindowsId, new Size(wndPos.Width, wndPos.Height)); }
private void ChangeWindowPos(Client.Model.WindowsModel wndPos) { holder.ChangeControlPos(wndPos.WindowsId, new Point(wndPos.PosLeft, wndPos.PosTop)); }
private void ChangeWindowName(Client.Model.WindowsModel wndPos) { holder.ChangeControlName(wndPos.WindowsId, wndPos.DisplayName); }
private void RemoveWindow(Client.Model.WindowsModel wndPos) { holder.RemoveControl(wndPos.WindowsId); }