/// <summary> /// The main window_ on loaded. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The e. /// </param> private void MainWindow_OnLoaded(object sender, RoutedEventArgs e) { this.utility = new Utility(this); File.Create(Utility.TempLogFilePath); this.utility.AddServersToCombox(); this.utility.StartFileWmiEvent(); // result.ToList().ForEach(item => this.production_server_combobox.Items.Add(item)); }
// 当分辨率发生变化时,重新设置各个LayerCanvas的参考点和分辨率,并重置偏移量 private void SetOriginAndResolution(double newResolution, Utility.Point2D originPoint) { _origin = originPoint; foreach (Layer layer in Layers) { ResetTranslate(); layer.LayerCanvas.Resolution = newResolution; layer.LayerCanvas.OriginX = originPoint.X; layer.LayerCanvas.OriginY = originPoint.Y; } }
public void SetJobInfo(Utility.FAJobInfo jobInfo) { if (jobInfo is Module.FATransferModule.TransferModuleJobInfo) JobInfo = (Module.FATransferModule.TransferModuleJobInfo)jobInfo; }
public void SetMotionInfo(Utility.MotionInfo info) { ViewModel.MotionTitle = info.Title; ViewModel.ArtistName = info.Artist; TimeSpan t = TimeSpan.FromSeconds(info.Duration); if (info.Duration > -1) { ViewModel.MotionDuration = string.Format("{0:D2}:{1:D2}", t.Minutes, t.Seconds); } ViewModel.RatingValue = 0.6; MotionID = info.MotionID; }
public Point MapToScreen(Utility.Point2D point2D) { if ((this._layerCollectionCanvas == null) || (point2D == null)) { return new Point(double.NaN, double.NaN); } try { return this._layerCollectionCanvas.TransformToVisual(this).Transform(this.mapToPanLayer(point2D)); } catch { return new Point(double.NaN, double.NaN); } }
public void Pan(Utility.Rectangle2D bounds) { //if (this.Layers != null && this.Layers.Count > 0) //{ // foreach (var item in Layers) // { // if (item != null) // { // UpdateLayer(item, bounds); // } // } // if (ViewBoundsChanged != null) // { // ViewBoundsChanged(this, new ViewBoundsChanedEventArgs(new Utility.Rectangle2D(_viewBounds), new Utility.Rectangle2D(bounds))); // } //} }
private void SetOriginAndResolution(double currentResolution, Utility.Point2D currentOrigin, bool resetTransforms) { }
private void LoadLayerInView(bool useTransitions, Utility.Rectangle2D drawBounds, Layer layer) { layer.ViewBounds = new Utility.Rectangle2D(drawBounds); layer.Resolution = _mapResolution; layer.Draw(); }
private void LoadLayersInView(bool useTransitions, Utility.Rectangle2D drawBounds) { if (drawBounds != null) { foreach (var layer in this.Layers) { this.LoadLayerInView(useTransitions, drawBounds, layer); } } }
private Point mapToPanLayer(Utility.Point2D pt) { if ((_origin != null) && !double.IsNaN(_mapResolution)) { return new Point((pt.X - _origin.X) / _mapResolution, (_origin.Y - pt.Y) / _mapResolution); } return new Point(double.NaN, double.NaN); }
public void SetJobInfo(Utility.FAJobInfo jobInfo) { if (jobInfo is Module.FALabelAttachModule.LabelAttachJobInfo) JobInfo = (Module.FALabelAttachModule.LabelAttachJobInfo)jobInfo; }
public void SetInfo(Utility.MotionInfo info) { ViewModel.ArtistName = info.Artist; ViewModel.MotionTitle = info.Title; MotionID = info.MotionID; }
//Creates an XML file with user verification code public XDocument writeXMLFile(string RandomNumber) { string Speech = " Your Verification Code is: " + RandomNumber+". "; string SpeakerString = Speech; string superSpeakerString = SpeakerString + SpeakerString + SpeakerString + SpeakerString; Utility utility = new Utility(); XDocument doc = new XDocument(new XDeclaration("1.0", "utf-8", "yes")); doc.Add(new XElement("Response", new XElement("Say", new XAttribute("voice", "alice"), superSpeakerString), new XElement ("Play", "http://demo.twilio.com/docs/classic.mp3") )); return doc; }
public void SetJobInfo(Utility.FAJobInfo jobInfo) { if (jobInfo is Module.FABoxStackerModule.StackerJobInfo) JobInfo = (Module.FABoxStackerModule.StackerJobInfo)jobInfo; }