public pointRWr Migrate() { pointRWr newc = new pointRWr(); newc.pointArray = DesktopHelper.MigrateList <pointWr, _pointWr>(point); return(newc); }
public questInfoListWr Migrate() { questInfoListWr newc = new questInfoListWr(); newc.questBasicArray = DesktopHelper.MigrateList <questBasicWr, _questBasicWr>(quests); return(newc); }
public quizListWr Migrate() { quizListWr newc = new quizListWr(); newc.quizBasicArray = DesktopHelper.MigrateList <quizBasicWr, _quizBasicWr>(result); return(newc); }
public badgesWr Migrate() { badgesWr newc = new badgesWr(); newc.badgeArray = DesktopHelper.MigrateList <badgeWr, _badgeWr>(badges); return(newc); }
public goodsInfoListWr Migrate() { goodsInfoListWr newc = new goodsInfoListWr(); newc.goodsInfoArray = DesktopHelper.MigrateList <goodsInfoWr, _goodsInfoWr>(goods_list); return(newc); }
private void rbConnect_Click(object sender, EventArgs e) { GlobalValiables.SerialPort = this.service.SerialPortConnect((string)this.rddlComPort.SelectedValue, (int)this.rddlBaudRate.SelectedValue); DesktopHelper.ShowAlert((int)GlobalValiables.enum_desktop_alert.Positive, "Port opened", "Serial port successfully opened"); InitializeButtons(); Close(); }
private void rbDisconnect_Click(object sender, EventArgs e) { this.service.SerialPortDisconnect(GlobalValiables.SerialPort); DesktopHelper.ShowAlert((int)GlobalValiables.enum_desktop_alert.Warning, "Port closed", "Serial port successfully closed"); InitializeButtons(); Close(); }
private Database getDatabase() { Database database = new Database(); if (dbid != null) { database.Id = dbid; } if (wgs != null) { database.WorkgroupServerName = wgs; } if (!database.IsValid) { database.Dispose(); DesktopHelper helper = new DesktopHelper(); database = helper.SelectDatabase(GetDesktopWindow(), false, false); } // if the database id and work group server are not set we rely on a default already having been set in the client. database.Connect(); //connect to the db using DB id and workgroup server return(database); }
public ruleWr Migrate() { ruleWr newc = new ruleWr(); newc.ruleEventArray = DesktopHelper.MigrateList <ruleEventWr, _ruleEventWr>(events); newc.ruleEventMissionArray = DesktopHelper.MigrateList <ruleEventMissionWr, _ruleEventMissionWr>(events_missions); newc.ruleEventQuestArray = DesktopHelper.MigrateList <ruleEventQuestWr, _ruleEventQuestWr>(events_quests); return(newc); }
public redeemWr Migrate() { redeemWr newc = new redeemWr(); newc.pointValue = point.point_value; newc.customArray = DesktopHelper.MigrateList <customWr, _customWr>(custom); newc.redeemBadgeArray = DesktopHelper.MigrateList <redeemBadgeWr, _redeemBadgeWr>(badge); return(newc); }
private void Client_ServerMessage(NamedPipeConnection <string[], string[]> connection, string[] message) { if (message[0] == "CurrentDesktopName" && string.IsNullOrWhiteSpace(name)) { name = message[1]; var dh = new DesktopHelper(); client.PushMessage(new string[] { "NewDesktopSwitch", name, dh.DesktopHandle.ToString() }); } }
public playerPublicWr Migrate() { playerPublicWr newc = new playerPublicWr(); newc.basic = base.Migrate(); newc.registered = DesktopHelper.GetTime(registered); newc.lastLogin = DesktopHelper.GetTime(last_login); newc.lastLogout = DesktopHelper.GetTime(last_logout); return(newc); }
/// <summary> /// Resizes the form based on the current form state object /// </summary> public void RestoreForm() { // abort if no form if (_form == null) { return; } if (_formState == null) { return; } // save current visible state and hide _isBeingResized = true; var oldVisible = _form.Visible; if (_formShown) { _form.Visible = false; } try { // if outside of desktop bounds, set to 100, 100 if (!DesktopHelper.IsLocationInDesktop(_formState.Location)) { _formState.Location = new Point(100, 100); } // if minimized, set to normal if (_formState.WindowState == FormWindowState.Minimized) { _formState.WindowState = FormWindowState.Normal; } // set form state to normal for resizing if (_form.WindowState != FormWindowState.Normal) { _form.WindowState = FormWindowState.Normal; } // set size and location _form.Size = _formState.Size; _form.Location = _formState.Location; } catch { } // restore visibility _isBeingResized = false; if (_formShown) { _form.Visible = oldVisible; } }
public quizPendingGradeWr Migrate() { quizPendingGradeWr newc = new quizPendingGradeWr(); newc.score = score; newc.quizPendingGradeRewardArray = DesktopHelper.MigrateList <quizPendingGradeRewardWr, _quizPendingGradeRewardWr>(rewards); newc.maxScore = max_score; newc.totalScore = total_score; newc.totalMaxScore = total_max_score; return(newc); }
private void Button_Click_3(object sender, RoutedEventArgs e) { DesktopHelper helper = new DesktopHelper(); Database newDatabase = helper.SelectDatabase(GetDesktopWindow(), false, false); if (newDatabase != null) { _database.Dispose(); _database = newDatabase; } }
public questionWr Migrate() { questionWr newc = new questionWr(); newc.question = question; newc.questionImage = question_image; newc.optionArray = DesktopHelper.MigrateList <questionOptionWr, _questionOptionWr>(options); newc.index = index; newc.total = total; newc.questionId = question_id; return(newc); }
public ruleEventQuestWr Migrate() { ruleEventQuestWr newc = new ruleEventQuestWr(); newc.eventArray = DesktopHelper.MigrateList <ruleEventWr, _ruleEventWr>(events); newc.questId = quest_id; newc.questName = quest_name; newc.description_ = description; newc.hint = hint; newc.image = image; return(newc); }
private void OnAlarmReceived(object source, string data) { if (GlobalValiables.AlarmErrorThrown == false) { SystemHelper.InvokeMethod(this, delegate { DesktopHelper.ShowAlert((int)GlobalValiables.enum_desktop_alert.Error, "Alert", "GRBL has thrown alarm alert, plesa handle this error to proced with your project"); }); GlobalValiables.AlarmErrorThrown = true; } else { } }
public ruleEventMissionWr Migrate() { ruleEventMissionWr newc = new ruleEventMissionWr(); newc.eventArray = DesktopHelper.MigrateList <ruleEventWr, _ruleEventWr>(events); newc.missionId = mission_id; newc.missionNumber = mission_number; newc.missionName = mission_name; newc.description_ = description; newc.hint = hint; newc.image = image; newc.questId = quest_id; return(newc); }
public quizWr Migrate() { quizWr newc = new quizWr(); newc.basic = base.Migrate(); newc.dateStart = DesktopHelper.GetTime(date_start); newc.dateExpire = DesktopHelper.GetTime(date_expire); newc.status = status; newc.gradeArray = DesktopHelper.MigrateList <gradeWr, _gradeWr>(grades); newc.deleted = deleted; newc.totalMaxScore = total_max_score; newc.totalQuestion = total_questions; return(newc); }
public questionAnsweredWr Migrate() { questionAnsweredWr newc = new questionAnsweredWr(); newc.optionArray = DesktopHelper.MigrateList <questionAnsweredOptionWr, _questionAnsweredOptionWr>(options); newc.score = score; newc.maxScore = max_score; newc.explanation = explanation; newc.totalScore = total_score; newc.totalMaxScore = total_max_score; newc.gradeDone = grade.Migrate(); newc.gradeDoneRewardArray = DesktopHelper.MigrateList <gradeDoneRewardWr, _gradeDoneRewardWr>(rewards); return(newc); }
public missionBasicWr Migrate() { missionBasicWr newc = new missionBasicWr(); newc.missionName = mission_name; newc.missionNumber = mission_number; newc.description = description; newc.hint = hint; newc.image = image; newc.completionArray = DesktopHelper.MigrateList <completionWr, _completionWr>(completion); newc.rewardArray = DesktopHelper.MigrateList <rewardWr, _rewardWr>(rewards); newc.missionId = mission_id; return(newc); }
// // Private methods // #region Private methods // Move cursor private void MoveCursor(int cDeltaPixel) { // If mouse is outside screen, move it to the center // In case of multiple screens are used, the mouse will be moved to the center of the main screen // This has never been a problem to me, but you can modify the code to support multiple screens if (!CursorHelper.CheckRelativePosition(cDeltaPixel, cDeltaPixel)) { var res_info = DesktopHelper.GetResolution(); var center_screen_pos = new CursorPosition(res_info.Width / 2, res_info.Height / 2); CursorHelper.SetPositionAbsolute(center_screen_pos); } else { CursorHelper.SetPositionRelative(cDeltaPixel, cDeltaPixel); } }
public goodsWr Migrate() { goodsWr newc = new goodsWr(); newc.goodsId = goods_id; newc.quantity = quantity; newc.image = image; newc.sortOrder = sort_order; newc.name = name; newc.description_ = description; newc.redeem = redeem.Migrate(); newc.code = code; newc.dateStart = DesktopHelper.GetTime(date_start); newc.dateExpire = DesktopHelper.GetTime(date_expire); return(newc); }
private void TopOpenStationDirectoryOnEventClick(UIComponent uiComponent, UIMouseEventParameter uiMouseEventParameter) { var data = AudioManagerHelper.GetActiveChannelData(); if (data != null) { var info = AudioManagerHelper.GetUserChannelInfo(data.Value.Info); var dir = DataLocation.gameContentPath; if (info != null) { dir = info.m_DefinitionDirectory; } DesktopHelper.OpenFileExternally(dir); } }
public gradeDoneWr Migrate() { gradeDoneWr newc = new gradeDoneWr(); newc.gradeId = grade_id; newc.start = start; newc.end = end; newc.grade = grade; newc.rank = rank; newc.rankImage = rank_image; newc.rewardArray = DesktopHelper.MigrateList <gradeDoneRewardWr, _gradeDoneRewardWr>(rewards); newc.score = score; newc.maxScore = max_score; newc.totalScore = total_score; newc.totalMaxScore = total_max_score; return(newc); }
public void RefreshVisibleWindows() { LoadingPanelVisibiliry = System.Windows.Visibility.Visible; var temp = DesktopHelper .GetVisibleWindows() .Select(_ => new WindowInfo() { TopLevelWindow = _, IsTargeted = Exclusions.IndexOf(_.Parent?.ProcessName.ToLower()) < 0, }); WindowsInfoList = new ObservableCollection <WindowInfo>(temp); OnPropertyChanged(nameof(WindowsInfoList)); LoadingPanelVisibiliry = System.Windows.Visibility.Collapsed; }
private void Select_Database_Button_Click(object sender, RoutedEventArgs e) { // Choose a different database DesktopHelper helper = new DesktopHelper(); Database newDatabase = helper.SelectDatabase(GetDesktopWindow(), false, false); if (newDatabase != null) { if (Database != null) { Database.Dispose(); } Database = newDatabase; Properties.Settings.Default["dbid"] = Database.Id; IsDatabaseAvailable = Database.IsValid; } }
/// <summary> /// Gets the name for the cached version of the specified image. /// </summary> /// <param name="imagePath">The image path to cache.</param> /// <returns>The name of the associated cached image</returns> private string GetCachedImageName(string imagePath) { var desktopSize = DesktopHelper.GetPrimaryDesktopSize(); var imageName = Path.GetFileNameWithoutExtension(imagePath) + "." + desktopSize.Width + "x" + desktopSize.Height + "." + File.GetLastWriteTime(imagePath).ToString("yyyyMMddhhmmss"); if (ApplyMedianFilter) { imageName += ".median"; } imageName += ".jpg"; return(Path.Combine(Path.GetTempPath(), imageName)); }
private void button1_Click(object sender, EventArgs e) { Database database = null; try { DesktopHelper helper = new DesktopHelper(); database = helper.SelectDatabase(GetDesktopWindow(), false, false); dbid = database?.Id; wgs = database?.WorkgroupServerName; label2.Text = $"{dbid} / {wgs}"; } finally { if (database != null) { database.Dispose(); } } }