public static bool HeleusCoinValidator(StatusView statusView, ExtEntry edit, string newText, string oldText) { if (decimal.TryParse(newText, System.Globalization.NumberStyles.AllowDecimalPoint, null, out var p)) { try { var h = Currency.ToHel(p); if (h < 0) { edit.Text = oldText; goto err; } return(h > 0); } catch { } } if (!newText.IsNullOrEmpty()) { edit.Text = oldText; } err: return(false); }
private void installProductsButton_Click(object sender, EventArgs e) { StatusView.LockUI(); StatusView.ShowProgressIndicator(); var updateOrInstallInfo = new UpdateOrInstallPluginsBackgroundWorkerArgument(); var selectedProduct = (DeploymentService.ProductDescription)productsListView.SelectedItems[0].Tag; // if there is a local plugin with same name and same major and minor version then it's an update var pluginsToUpdate = from plugin in selectedProduct.Plugins let matchingLocalPlugins = from localPlugin in pluginManager.Plugins where localPlugin.Name == plugin.Name where localPlugin.Version.Major == plugin.Version.Major where localPlugin.Version.Minor == plugin.Version.Minor where IsNewerThan(plugin, localPlugin) select localPlugin where matchingLocalPlugins.Count() > 0 select plugin; // otherwise install a new plugin var pluginsToInstall = selectedProduct.Plugins.Except(pluginsToUpdate); updateOrInstallInfo.PluginsToInstall = pluginsToInstall .Cast <IPluginDescription>() .ToList(); updateOrInstallInfo.PluginsToUpdate = pluginsToUpdate .Cast <IPluginDescription>() .ToList(); updateOrInstallPluginsBackgroundWorker.RunWorkerAsync(updateOrInstallInfo); }
// POST: Cadastro/Status/Novo public ActionResult Novo(StatusView status) { status.Ativo = true; status = StatusExecute.CriarNovoStatus(status, User.Identity.Name.ToString(), DateTime.Now); return(RedirectToAction("Index")); }
public MainForm() { InitializeComponent(); outputView = new OutputView(this); registersView = new RegisterView(this); displayView = new DisplayView(this); controlView = new ControlView(this); callStackView = new CallStackView(this); stackFrameView = new StackFrameView(this); statusView = new StatusView(this); symbolView = new SymbolView(this); watchView = new WatchView(this); breakPointView = new BreakpointView(this); instructionView = new InstructionView(this); methodView = new MethodView(this); //scriptView = new ScriptView(this); sourceView = new SourceView(this); sourceDataView = new SourceDataView(this); AppLocations.FindApplications(); LauncherOptions.EnableQemuGDB = true; }
void deleteProductWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { if (e.Error != null) { StatusView.ShowError("Connection Error", "There was an error while connecting to the server." + Environment.NewLine + "Please check your connection settings and user credentials."); this.products.Clear(); this.plugins.Clear(); } else { this.products = new List <DeploymentService.ProductDescription>( (DeploymentService.ProductDescription[])((object[])e.Result)[0]); this.plugins = new List <DeploymentService.PluginDescription>( (DeploymentService.PluginDescription[])((object[])e.Result)[1]); EnableControls(); } UpdateProductsList(); dirtyProducts.Clear(); StatusView.HideProgressIndicator(); StatusView.RemoveMessage(DeleteProductMessage); StatusView.UnlockUI(); }
public MainForm() { InitializeComponent(); outputView = new OutputView(this); registersView = new RegisterView(this); displayView = new DisplayView(this); controlView = new ControlView(this); callStackView = new CallStackView(this); stackFrameView = new StackFrameView(this); //stackView = new StackView(this); //flagView = new FlagView(this); statusView = new StatusView(this); symbolView = new SymbolView(this); watchView = new WatchView(this); breakPointView = new BreakPointView(this); instructionView = new InstructionView(this); methodView = new MethodView(this); //scriptView = new ScriptView(this); AppLocations.FindApplications(); }
private void refreshButton_Click(object sender, EventArgs e) { StatusView.LockUI(); StatusView.ShowProgressIndicator(); StatusView.ShowMessage(RefreshMessage); refreshProductsWorker.RunWorkerAsync(); }
private void saveButton_Click(object sender, EventArgs e) { StatusView.LockUI(); StatusView.ShowProgressIndicator(); StatusView.ShowMessage(UploadMessage); uploadChangedProductsWorker.RunWorkerAsync(dirtyProducts); }
private void refreshButton_Click(object sender, EventArgs e) { StatusView.LockUI(); StatusView.ShowProgressIndicator(); // refresh = update empty list of plugins (plugins are reloaded) updatePluginsBackgroundWorker.RunWorkerAsync(new IPluginDescription[0]); }
private void refreshRemoteButton_Click(object sender, EventArgs e) { StatusView.LockUI(); StatusView.ShowProgressIndicator(); StatusView.ShowMessage(PluginDiscoveryMessage); refreshServerPluginsBackgroundWorker.RunWorkerAsync(); }
private void UpdateTeamDisplay(TeamData td) { StatusView.BeginUpdate(); StatusView.Items.RemoveByKey(td.CID); ListViewItem lvi = new ListViewItem(); lvi.Text = td.CID; lvi.Name = td.CID; lvi.SubItems.Add(td.Name); lvi.SubItems.Add(td.Coordinates.MGRS + " / " + td.Coordinates.Latitude.ToString("N6") + ", " + td.Coordinates.Longitude.ToString("N6")); DateTime add_time = td.Coordinates.Time; lvi.SubItems.Add(add_time.ToShortTimeString() + add_time.ToUniversalTime().ToString(" (HH:mm:ssZ)")); if (td.Status == TrackStatus.TRACKING) { lvi.Group = StatusView.Groups["Tracking"]; } else if (td.Status == TrackStatus.DELAYED) { lvi.Group = StatusView.Groups["Delayed"]; } else { lvi.Group = StatusView.Groups["Active"]; } StatusView.Items.Add(lvi); StatusView.EndUpdate(); }
public void ProcessRequest(HttpContext context) { var action = new ActionModel(); action.Context = context; action.Init(); var model = new StatusModel(); model.Init(); var view = new StatusView(model); view.Render(context.Response.Output); }
public static StatusView EditarStatus(StatusView status, string AlteradoPor, DateTime AlteradoEm) { Status objdomin = status.DeViewParaDomin(); objdomin.AlteradoPor = AlteradoPor; objdomin.AlteradoEm = AlteradoEm; status = Executar.Cadastro.Status.AtualizarStatus(objdomin).DeDominParaView(); return(status); }
public static StatusView CriarNovoStatus(StatusView status, string CriadoPor, DateTime CriadoEm) { Status objdomin = status.DeViewParaDomin(); objdomin.CriadoPor = CriadoPor; objdomin.CriadoEm = CriadoEm; status = Executar.Cadastro.Status.CriarNovoStatus(objdomin).DeDominParaView(); return(status); }
private void updateAndInstallButton_Click(object sender, EventArgs e) { var installedPlugins = pluginManager.Plugins.OfType <IPluginDescription>().ToList(); updatePluginsBackgroundWorker.RunWorkerAsync(installedPlugins); StatusView.LockUI(); StatusView.ShowProgressIndicator(); StatusView.RemoveMessage(NoUpdatesAvailableMessage); StatusView.ShowMessage(CheckingPluginsMessage); }
private void deleteProductButton_Click(object sender, EventArgs e) { StatusView.LockUI(); StatusView.ShowProgressIndicator(); StatusView.ShowMessage(DeleteProductMessage); var selectedProducts = from item in productsListView.SelectedItems.OfType <ListViewItem>() select(DeploymentService.ProductDescription) item.Tag; deleteProductWorker.RunWorkerAsync(selectedProducts.ToList()); }
void removePluginsBackgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { if (e.Error != null) { StatusView.ShowError("File Deletion Error", "There was problem while deleting files." + Environment.NewLine + e.Error.Message); } UpdateControl(); StatusView.HideProgressIndicator(); StatusView.UnlockUI(); }
private void SetupAuctionStatus() { statusVM = new AuctionStatusViewModel(); StatusView v = new StatusView() { DataContext = statusVM }; ChangeGridControl(v); }
private void removeButton_Click(object sender, EventArgs e) { StatusView.LockUI(); StatusView.ShowProgressIndicator(); var checkedPlugins = localPluginsListView.CheckedItems.OfType <ListViewItem>() .Select(item => item.Tag) .OfType <IPluginDescription>() .ToList(); removePluginsBackgroundWorker.RunWorkerAsync(checkedPlugins); }
void updateOrInstallPluginsBackgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { if (e.Error != null) { StatusView.ShowError("Connection Error", "There was an error while connecting to the server." + Environment.NewLine + "Please check your connection settings and user credentials."); } else { UpdateControl(); } StatusView.UnlockUI(); StatusView.HideProgressIndicator(); }
public static StatusView DeDominParaView(this Status source) { StatusView status = new StatusView() { StatusId = source.StatusId, Descricao = source.Descricao, Ativo = source.Ativo }; return(status); }
public static Status DeViewParaDomin(this StatusView source) { Status status = new Status() { StatusId = source.StatusId, Descricao = source.Descricao, Ativo = source.Ativo }; return(status); }
public static bool ExcluirStatus(StatusView status, string AlteradoPor, DateTime AlteradoEm) { Status objdomin = status.DeViewParaDomin(); objdomin.AlteradoPor = AlteradoPor; objdomin.AlteradoEm = AlteradoEm; bool ret = Executar.Cadastro.Status.ExcluirStatus(objdomin); return(ret); }
public StatusPresenter(StatusView view) { this.view = view; this.manager = GameManager.Instance; GameEvent.Instance.AddRoomEvent(OnRoomUpdate); model.ObserveEveryValueChanged(x => x.state).Subscribe(_ => { SetStateHandler(); }); }
public override void LoadView() { var view = new UIView(); view.Add(statusView = new StatusView() { Retry = RetrySync, Cancel = DismissMessage, }); View = view; }
private void updateSelectedButton_Click(object sender, EventArgs e) { StatusView.LockUI(); StatusView.ShowProgressIndicator(); StatusView.RemoveMessage(NoUpdatesAvailableMessage); StatusView.ShowMessage(CheckingPluginsMessage); var checkedPlugins = localPluginsListView.CheckedItems.OfType <ListViewItem>() .Select(item => item.Tag) .OfType <IPluginDescription>() .ToList(); updatePluginsBackgroundWorker.RunWorkerAsync(checkedPlugins); }
void ShowServo(bool immediate = false) { uint delay = 500; if (immediate) { delay = 0; } UrlView.TranslateTo(0, 0, delay, Easing.SpringOut); ServoView.TranslateTo(0, 0, delay, Easing.SpringOut); StatusView.ScaleTo(1, delay, Easing.Linear); _viewModel.ToolbarHeight = (int)ServoView.Bounds.Top; }
private void NewTrackingInfoReceived(object sender, EventArgs e) { TrackingData td = ((GPSTrack)sender).NewData; if (StatusView.InvokeRequired) { StatusView.Invoke(new UpdateTrackingStatus(this.UpdateTeamStatus), td); } else { UpdateTeamStatus(td); } }
public MainView() { MainWindow = new Window("Сервер приложений ГЛОБАЛ"); statusView = new StatusView(); MainWindow.DeleteEvent += Window_Delete; gkNode = new NodeView(); gkNode.AppendColumn("Время", new CellRendererText { MaxWidthChars = 80, Height = 20 }, "text", 0); gkNode.AppendColumn("Адрес", new CellRendererText { MaxWidthChars = 80, Height = 20 }, "text", 1); gkNode.AppendColumn("Название", new CellRendererText { MaxWidthChars = 80, Height = 20 }, "text", 2); gkNode.AppendColumn("Прогресс", new CellRendererText { MaxWidthChars = 80, Height = 20 }, "text", 3); logNode = new NodeView(); logNode.AppendColumn("Название", new CellRendererText { MaxWidthChars = 80, Height = 20 }, "text", 0); logNode.AppendColumn("Время", new CellRendererText { MaxWidthChars = 80, Height = 20 }, "text", 1); logNode.NodeStore = new NodeStore(typeof(LogTreeNode)); connectionNode = new NodeView(); connectionNode.AppendColumn("Тип", new CellRendererText { MaxWidthChars = 80, Height = 20 }, "text", 0); connectionNode.AppendColumn("Адрес", new CellRendererText { MaxWidthChars = 80, Height = 20 }, "text", 1); connectionNode.AppendColumn("Пользователь", new CellRendererText { MaxWidthChars = 80, Height = 20 }, "text", 2); connectionNode.ButtonPressEvent += new ButtonPressEventHandler(OnItemButtonPressed); pollingNode = new NodeView(); pollingNode.AppendColumn("Клиент", new CellRendererText { MaxWidthChars = 80, Height = 20 }, "text", 0); pollingNode.AppendColumn("Идентификатор", new CellRendererText { MaxWidthChars = 80, Height = 20 }, "text", 1); pollingNode.AppendColumn("Первый поллинг", new CellRendererText { MaxWidthChars = 80, Height = 20 }, "text", 2); pollingNode.AppendColumn("Последний поллинг", new CellRendererText { MaxWidthChars = 80, Height = 20 }, "text", 3); pollingNode.AppendColumn("Индекс", new CellRendererText { MaxWidthChars = 80, Height = 20 }, "text", 4); pollingNode.NodeStore = new NodeStore(typeof(PollingTreeNode)); operationNode = new NodeView(); operationNode.AppendColumn("Название", new CellRendererText { MaxWidthChars = 80, Height = 20 }, "text", 0); operationNode.NodeStore = new NodeStore(typeof(OperationTreeNode)); Notebook notepadControl = new Notebook(); notepadControl.AppendPage(connectionNode, new Label("Соединения")); notepadControl.AppendPage(logNode, new Label("Лог")); notepadControl.AppendPage(statusView.Create(), new Label("Статус")); notepadControl.AppendPage(gkNode, new Label("ГК")); notepadControl.AppendPage(pollingNode, new Label("Поллинг")); notepadControl.AppendPage(operationNode, new Label("Операции")); notepadControl.AppendPage(new LicenseView().Create(), new Label("Лицензирование")); MainWindow.Add(notepadControl); MainWindow.SetDefaultSize(700, 500); MainWindow.ShowAll(); GKLifecycleManager.GKLifecycleChangedEvent += On_GKLifecycleChangedEvent; LicenseManager.LicenseChanged += On_LicenseChanged; GKLifecycles = new List<KeyValuePair<GKLifecycleInfo, DateTime>>(); Clients = new List<ClientCredentials>(); ClientPolls = new List<ClientPoll>(); ServerTasks = new List<ServerTask>(); Current = this; }
protected override void OnBindingContextChanged() { base.OnBindingContextChanged(); if (BindingContext == null) { return; } var mute = BindingContext as DataMute; var target = mute.Target as DataMute.StatusTarget; StatusView.BindingContext = target.Status; StatusView.Update(); }
void refreshServerPluginsBackgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { if (e.Error != null) { StatusView.ShowError("Connection Error", "There was an error while connecting to the server." + Environment.NewLine + "Please check your connection settings and user credentials."); } else { RefreshBackgroundWorkerResult refreshResult = (RefreshBackgroundWorkerResult)e.Result; products = refreshResult.RemoteProducts; plugins = refreshResult.RemotePlugins; UpdateControl(); } StatusView.UnlockUI(); StatusView.RemoveMessage(PluginDiscoveryMessage); StatusView.HideProgressIndicator(); }
private void uploadButton_Click(object sender, EventArgs e) { var selectedPlugins = from item in listView.Items.Cast <ListViewItem>() where item.Checked where item.Tag is IPluginDescription select item.Tag as IPluginDescription; if (selectedPlugins.Count() > 0) { StatusView.LockUI(); StatusView.ShowProgressIndicator(); StatusView.ShowMessage(UploadMessage); pluginUploadWorker.RunWorkerAsync(selectedPlugins.ToList()); } }
protected override void OnApplyTemplate() { _statusView = GetTemplateChild("StatusView") as StatusView; UpdateDirectionState(); }
public override void LoadView () { var view = new UIView (); view.Add (statusView = new StatusView () { Retry = RetrySync, Cancel = DismissMessage, }); View = view; }