public static Show ( bool showNow, string textHeader, ArrayList array ) : GenericWindow, | ||
showNow | bool | |
textHeader | string | |
array | ArrayList | |
리턴 | GenericWindow, |
protected override void createGenericWindow() { genericWinESR = GenericWindow.Show(false, //don't show now Catalog.GetString("Select persons to compare"), bigArray); genericWinESR.SetTreeview(columnsString, true, data, nonSensitiveRows, Constants.ContextMenu.NONE, false); //select this person row genericWinESR.SelectRowWithID(0, currentPerson.UniqueID); genericWinESR.ResetComboCheckBoxesOptions(); genericWinESR.CreateComboCheckBoxes(); genericWinESR.MarkActiveCurves(checkboxes); genericWinESR.ShowButtonCancel(false); genericWinESR.SetButtonAcceptSensitive(true); //to have encoderCompareInter without opening the select window updateEncoderCompareInterAndReps(); //used when we don't need to read data, //and we want to ensure next window will be created at needed size //genericWinESR.DestroyOnAccept=true; //here is comented because we are going to read the checkboxes genericWinESR.Type = GenericWindow.Types.ENCODER_SEL_REPS_GROUP_CURRENT_SESS; }
protected override void createGenericWindow() { genericWinESR = GenericWindow.Show(false, //don't show now //TODO: change message string.Format(Catalog.GetString("Compare repetitions between the following sessions"), currentPerson.Name), bigArray); //convert data from array of EncoderPersonCurvesInDB to array of strings [] ArrayList dataConverted = new ArrayList(); foreach (EncoderPersonCurvesInDB encPS in data) { dataConverted.Add(encPS.ToStringArray(true)); } genericWinESR.SetTreeview(columnsString, true, dataConverted, nonSensitiveRows, Constants.ContextMenu.NONE, false); genericWinESR.ResetComboCheckBoxesOptions(); genericWinESR.CreateComboCheckBoxes(); genericWinESR.MarkActiveCurves(checkboxes); genericWinESR.ShowButtonCancel(false); genericWinESR.SetButtonAcceptSensitive(true); //to have encoderCompareInter without opening the select window updateEncoderCompareInterAndReps(); updateEncoderInterSessionDateOnXWeights(); //used when we don't need to read data, //and we want to ensure next window will be created at needed size //genericWinESR.DestroyOnAccept=true; //here is comented because we are going to read the checkboxes genericWinESR.Type = GenericWindow.Types.ENCODER_SEL_REPS_IND_ALL_SESS; }
private void on_button_add_comment_clicked(object o, EventArgs args) { //new DialogMessage(Constants.MessageTypes.INFO, "not implemented yet"); //see if there's any comment string comment = ""; if (selected) { TreeModel model; TreeIter iter1; if (treeview1.Selection.GetSelected(out model, out iter1)) { string str = getRow(iter1); string [] statRow = str.ToString().Split(new char[] { '\t' }); comment = statRow[8]; } genericWin = GenericWindow.Show(Catalog.GetString("Add comment"), Catalog.GetString("Comment this statistic"), Constants.GenericWindowShow.TEXTVIEW); genericWin.SetTextview(comment); genericWin.Button_accept.Clicked += new EventHandler(on_comment_add_accepted); } }
protected override void createGenericWindow() { /* * Disabled because combo exercise is selected before (not on genericWinESR) * * add exercises to the combo (only the exercises done, and only unique) * ArrayList encoderExercisesNames = new ArrayList(); * foreach(EncoderSQL es in data) { * encoderExercisesNames = Util.AddToArrayListIfNotExist(encoderExercisesNames, Catalog.GetString(es.exerciseName)); * } */ genericWinESR = GenericWindow.Show(false, //don't show now string.Format(Catalog.GetString("Saved repetitions of athlete {0} on this session."), currentPerson.Name) + "\n" + Catalog.GetString("Activate the repetitions you want to use clicking on first column.") + "\n" + Catalog.GetString("If you want to edit or delete a row, right click on it.") + "\n", bigArray); genericWinESR.SetTreeview(columnsString, true, dataPrint, new ArrayList(), Constants.ContextMenu.EDITDELETE, false); genericWinESR.ResetComboCheckBoxesOptions(); //genericWinESR.AddOptionsToComboCheckBoxesOptions(encoderExercisesNames); genericWinESR.CreateComboCheckBoxes(); genericWinESR.MarkActiveCurves(checkboxes); //find all persons in current session ArrayList personsPre = SqlitePersonSession.SelectCurrentSessionPersons( currentSession.UniqueID, false); //means: do not returnPersonAndPSlist string [] persons = new String[personsPre.Count]; int count = 0; foreach (Person p in personsPre) { persons[count++] = p.UniqueID.ToString() + ":" + p.Name; } genericWinESR.SetComboValues(persons, currentPerson.UniqueID + ":" + currentPerson.Name); genericWinESR.SetComboLabel(Catalog.GetString("Change the owner of selected repetition") + " (" + Catalog.GetString("code") + ":" + Catalog.GetString("name") + ")"); genericWinESR.ShowEditRow(false); genericWinESR.CommentColumn = 10; genericWinESR.ShowButtonCancel(false); genericWinESR.SetButtonAcceptSensitive(true); genericWinESR.SetButtonCancelLabel(Catalog.GetString("Close")); //used when we don't need to read data, //and we want to ensure next window will be created at needed size //genericWinESR.DestroyOnAccept=true; //here is comented because we are going to read the checkboxes genericWinESR.Type = GenericWindow.Types.ENCODER_SEL_REPS_IND_CURRENT_SESS; }
public void RunConcurrently(object sender, IRunnable runnable) { _context.Send(_ => { var owner = GetOwner(sender); var window = new GenericWindow { DataContext = runnable, Owner = owner }; window.Show(); }); }
public static void LoadGenericWindow(ref GenericWindow genWindow, System.Windows.Window owner, eWindowShowStyle windowStyle, string windowTitle, Page windowPage, ObservableList <Button> windowBtnsList = null, bool showClosebtn = true, string closeBtnText = "Close", RoutedEventHandler closeEventHandler = null, bool startupLocationWithOffset = false) { genWindow = null; eWindowShowStyle winStyle; do { if (genWindow != null) { winStyle = genWindow.ReShowStyle; genWindow.BottomPanel.Children.Clear(); genWindow = null; } else { winStyle = windowStyle; } genWindow = new GenericWindow(owner, winStyle, windowTitle, windowPage, windowBtnsList, showClosebtn, closeBtnText, closeEventHandler); genWindow.Topmost = true; genWindow.Activate(); genWindow.Title = windowPage.Title; if (startupLocationWithOffset) { genWindow.WindowStartupLocation = WindowStartupLocation.Manual; genWindow.Left = 50; genWindow.Top = 200; } if (winStyle == eWindowShowStyle.Dialog || winStyle == eWindowShowStyle.OnlyDialog) { genWindow.ShowDialog(); } else { genWindow.Show(); } }while (genWindow.NeedToReShow); }