public void ReadXml(System.Xml.XmlReader r) { bool wasEmpty = r.IsEmptyElement; if (wasEmpty) { return; } _variable = r.GetAttribute("Map"); r.Read(); //<AddressInstance> _startAddress = Convert.ToUInt32(r.ReadElementContentAsString(), 16); _X = r.ReadElementContentAsInt(); _Y = r.ReadElementContentAsInt(); _mapSize = r.ReadElementContentAsInt(); _value = r.ReadElementContentAsInt(); _byteOnCell = r.ReadElementContentAsInt(); _mapName = r.ReadElementContentAsString(); _comment = r.ReadElementContentAsString(); r.Read(); { //<FRom> _sizeOfCellX = r.ReadElementContentAsInt(); _sizeOfCellY = r.ReadElementContentAsInt(); _loColor = (int)Convert.ToUInt32(r.ReadElementContentAsString(), 16); _hiColor = (int)Convert.ToUInt32(r.ReadElementContentAsString(), 16); _xSatteliteConstName = r.ReadElementContentAsString(); _ySatteliteConstName = r.ReadElementContentAsString(); _hide = r.ReadElementContentAsBoolean(); _flip = r.ReadElementContentAsBoolean(); _mask = (byte)r.ReadElementContentAsInt(); _mapView = (ViewEnum)r.ReadElementContentAsInt(); } r.ReadEndElement(); //</FRom> r.ReadEndElement(); //</AddressInstance> }
/// <summary> /// Производит подстройку дополнительных параметров this. /// </summary> /// <param name="aib">основные параметры</param> private void AdjustmentAdvancedParams(AddressInstanceBase aib) { switch (aib.ConstName) { case "HIGH_FUEL": case "REG_FUEL": this._xSatteliteConstName = "TP_SCALE_FUEL"; this._ySatteliteConstName = "RPM_SCALE_FUEL"; this._mapView = ViewEnum.Filtered; this._mask = 0x7f; break; case "HIGH_FIRE": case "REG_FIRE": this._xSatteliteConstName = "TP_SCALE_FIRE"; this._ySatteliteConstName = "RPM_SCALE_FIRE"; this._mapView = ViewEnum.Filtered; this._mask = 0x7f; break; case "TP_SCALE_FIRE": case "RPM_SCALE_FIRE": this._mapView = ViewEnum.Scale; break; default: this._mapView = ViewEnum.Scale; this._mask = 0x0; break; } }
public void ShowView(ViewEnum view) { if (OnShowView != null) { OnShowView(this, view); } }
public void GoTo(ViewEnum view) { OnChangeView(new ChangeViewEventArgs() { View = view }); }
/// <summary> /// Initializes a new instance of the <see cref="GroupPrivacy" /> class. /// </summary> /// <param name="comment">Who can comment on the group. Option descriptions: * `all` - Anyone can comment on the group. * `members` - Only group members can comment on the group. (required).</param> /// <param name="invite">Who can invite new members to the group. Option descriptions: * `all` - Anyone can invite new members. * `members` - Only group members can invite new members. (required).</param> /// <param name="join">Who can join the group. Option descriptions: * `anybody` - Anyone can join the group. * `members` - Only people with a Vimeo account can join the group. (required).</param> /// <param name="videos">Who can add videos to the group. Option descriptions: * `all` - Anyone can add videos to the group. * `members` - Only group members can add videos to the group. (required).</param> /// <param name="view">Who can access the group. Option descriptions: * `anybody` - Anyone can access the group. * `members` - Only group members can access the group. (required).</param> public GroupPrivacy(CommentEnum comment = default(CommentEnum), InviteEnum invite = default(InviteEnum), JoinEnum join = default(JoinEnum), VideosEnum videos = default(VideosEnum), ViewEnum view = default(ViewEnum)) { this.Comment = comment; this.Invite = invite; this.Join = join; this.Videos = videos; this.View = view; }
/// <summary> /// Initializes a new instance of the <see cref="VideoPrivacy" /> class. /// </summary> /// <param name="add">Whether the video can be added to collections. (required).</param> /// <param name="comments">Who can comment on the video: Option descriptions: * `anybody` - Anyone can comment on the video. * `contacts` - Only contacts can comment on the video. * `nobody` - No one can comment on the video. (required).</param> /// <param name="download">The video's download permission setting. (required).</param> /// <param name="embed">The video's embed permission setting: Option descriptions: * `private` - The video is private. * `public` - Anyone can embed the video. (required).</param> /// <param name="view">The general privacy setting for the video: Option descriptions: * `anybody` - Anyone can view the video. * `contacts` - Only contacts can view the video. * `disable` - Hide from vimeo * `nobody` - No one besides the owner can view the video. * `password` - Anyone with the video's password can view the video. * `unlisted` - Not searchable from vimeo.com * `users` - Only people with a Vimeo account can view the video. (required).</param> public VideoPrivacy(bool add = default(bool), CommentsEnum comments = default(CommentsEnum), bool download = default(bool), EmbedEnum embed = default(EmbedEnum), ViewEnum view = default(ViewEnum)) { this.Add = add; this.Comments = comments; this.Download = download; this.Embed = embed; this.View = view; }
public static void loadView(ViewEnum view) { switch (view) { case ViewEnum.MonAn: List <MonAn> result = BaseDAO.XemMonAn(); MainWindow.dtgMonAn.ItemsSource = ToDataTable <MonAn>(result).DefaultView; break; case ViewEnum.ChuongTrinhKhuyenMai: List <ChuongTrinhKhuyenMai> result2 = BaseDAO.XemChuongTrinhKhuyenMai(); MainWindow.dtgKhuyenMai.ItemsSource = ToDataTable <ChuongTrinhKhuyenMai>(result2).DefaultView; break; case ViewEnum.ThanhVien: List <ThanhVien> result3 = BaseDAO.XemThanhVien(); MainWindow.dtgThanhVien.ItemsSource = ToDataTable <ThanhVien>(result3).DefaultView; break; case ViewEnum.DonHang: List <DonHang> listDonHang = BaseDAO.XemDonHang(); MainWindow.dtgDonHang.ItemsSource = ToDataTable <DonHang>(listDonHang).DefaultView; break; case ViewEnum.MonAnDirtyRead: List <MonAn> listMonAn = BaseDAO.XemMonAn_DirtRead_T2(); MainWindow.dtgMonAn.ItemsSource = ToDataTable <MonAn>(listMonAn).DefaultView; break; case ViewEnum.MonAnDirtyRead_Fixed: List <MonAn> listMonAn1 = BaseDAO.XemMonAn_DirtRead_T2_fixed(); MainWindow.dtgMonAn.ItemsSource = ToDataTable <MonAn>(listMonAn1).DefaultView; break; case ViewEnum.ThanhVienDirtyRead: List <ThanhVien> listThanhVien = BaseDAO.XemThanhVien_DirtRead_T2(); MainWindow.dtgThanhVien.ItemsSource = ToDataTable <ThanhVien>(listThanhVien).DefaultView; break; case ViewEnum.ThanhVienDirtyRead_Fixed: List <ThanhVien> listThanhVien1 = BaseDAO.XemThanhVien_DirtRead_T2_Fixed(); MainWindow.dtgThanhVien.ItemsSource = ToDataTable <ThanhVien>(listThanhVien1).DefaultView; break; case ViewEnum.Voucher_DirtyRead: List <ChuongTrinhKhuyenMai> result4 = BaseDAO.XemChuongTrinhKhuyenMai_DirtyRead(); MainWindow.dtgKhuyenMai.ItemsSource = ToDataTable <ChuongTrinhKhuyenMai>(result4).DefaultView; break; case ViewEnum.Voucher_DirtyRead_Fixed: List <ChuongTrinhKhuyenMai> result5 = BaseDAO.XemChuongTrinhKhuyenMai_DirtyRead_fixed(); MainWindow.dtgKhuyenMai.ItemsSource = ToDataTable <ChuongTrinhKhuyenMai>(result5).DefaultView; break; } }
/// <summary> Returns namespace that the object belongs to.</summary> /// <returns> namespace /// </returns> public static string GetNamespace(this ViewEnum viewEnum) { switch (viewEnum) { case ViewEnum.LENGTH: case ViewEnum.FIRST_LENGTH_WINDOW: case ViewEnum.LENGTH_BATCH: case ViewEnum.TIME_WINDOW: case ViewEnum.FIRST_TIME_WINDOW: case ViewEnum.TIME_BATCH: case ViewEnum.TIME_LENGTH_BATCH: case ViewEnum.TIME_ACCUM: case ViewEnum.EXT_TIMED_WINDOW: case ViewEnum.EXT_TIMED_BATCH: case ViewEnum.KEEPALL_WINDOW: return("win"); case ViewEnum.SIZE: case ViewEnum.LAST_EVENT: case ViewEnum.FIRST_EVENT: case ViewEnum.UNIQUE_BY_PROPERTY: case ViewEnum.UNIQUE_FIRST_BY_PROPERTY: case ViewEnum.GROUP_MERGE: case ViewEnum.GROUP_PROPERTY: return("std"); case ViewEnum.UNIVARIATE_STATISTICS: case ViewEnum.WEIGHTED_AVERAGE: case ViewEnum.CORRELATION: case ViewEnum.REGRESSION_LINEST: return("stat"); case ViewEnum.SORT_WINDOW: case ViewEnum.RANK_WINDOW: case ViewEnum.TIME_ORDER: case ViewEnum.TIME_TO_LIVE: return("ext"); case ViewEnum.PRIOR_EVENT_VIEW: return("int"); case ViewEnum.INTERNAL_UNION: case ViewEnum.INTERNAL_INTERSECT: case ViewEnum.INTERNAL_MATCH_RECOG: case ViewEnum.NOOP_WINDOW: return("internal"); case ViewEnum.EXPRESSION_WINDOW: case ViewEnum.EXPRESSION_BATCH_WINDOW: return("win"); } throw new ArgumentException("invalid value", nameof(viewEnum)); }
private void NavigationViewModel_ChangeViewEvent(object sender, ViewEnum e) { switch (e) { case ViewEnum.Search: grid.DataContext = SearchControllViewModel; break; case ViewEnum.Subscribe: grid.DataContext = SubsribersViewModel; break; case ViewEnum.Download: grid.DataContext = DownLoadManagerViewModel; break; } OnPropertyChanged(); }
public IView Return(ViewEnum viewType) { switch (viewType) { case ViewEnum.AskFoodView: return(new ReturnAskFoodView(branch)); case ViewEnum.AskView: return(new ReturnAskView(branch)); case ViewEnum.CompleteMessagemView: return(new ReturnCompleteMessageView(food, branch)); case ViewEnum.SuccessView: return(new ReturnSuccessView()); } return(new ReturnMainWindowView()); }
/// <summary> Returns the enumeration value of the view for merging the data generated by another view.</summary> /// <returns> view enum for the merge view /// </returns> public static ViewEnum?GetMergeView(this ViewEnum viewEnum) { switch (viewEnum) { case ViewEnum.LENGTH: case ViewEnum.FIRST_LENGTH_WINDOW: case ViewEnum.LENGTH_BATCH: case ViewEnum.TIME_WINDOW: case ViewEnum.FIRST_TIME_WINDOW: case ViewEnum.TIME_BATCH: case ViewEnum.TIME_LENGTH_BATCH: case ViewEnum.TIME_ACCUM: case ViewEnum.EXT_TIMED_WINDOW: case ViewEnum.EXT_TIMED_BATCH: case ViewEnum.KEEPALL_WINDOW: case ViewEnum.SIZE: case ViewEnum.LAST_EVENT: case ViewEnum.FIRST_EVENT: case ViewEnum.UNIQUE_BY_PROPERTY: case ViewEnum.UNIQUE_FIRST_BY_PROPERTY: case ViewEnum.GROUP_MERGE: return(null); case ViewEnum.GROUP_PROPERTY: return(ViewEnum.GROUP_MERGE); case ViewEnum.UNIVARIATE_STATISTICS: case ViewEnum.WEIGHTED_AVERAGE: case ViewEnum.CORRELATION: case ViewEnum.REGRESSION_LINEST: case ViewEnum.SORT_WINDOW: case ViewEnum.RANK_WINDOW: case ViewEnum.TIME_ORDER: case ViewEnum.PRIOR_EVENT_VIEW: case ViewEnum.INTERNAL_UNION: case ViewEnum.INTERNAL_INTERSECT: case ViewEnum.INTERNAL_MATCH_RECOG: case ViewEnum.EXPRESSION_WINDOW: case ViewEnum.EXPRESSION_BATCH_WINDOW: return(null); } throw new ArgumentException("invalid value", "viewEnum"); }
private void ChangeLayout(ViewEnum layoutEnum) { UnInitLayout(); _currentLayout = layoutEnum; switch (layoutEnum) { case ViewEnum.Start: { ContentControl = _contentControls[ViewEnum.Start]; Title = "Start"; } break; case ViewEnum.Capture: { ContentControl = _contentControls[ViewEnum.Capture]; Title = "Capture"; break; } case ViewEnum.Adjust: { ContentControl = _contentControls[ViewEnum.Adjust]; Title = "Edit"; break; } case ViewEnum.Export: { ContentControl = _contentControls[ViewEnum.Export]; Title = "Export"; break; } default: throw new ArgumentOutOfRangeException(nameof(layoutEnum), layoutEnum, null); } InitLayout(); }
public void SelectView(ViewEnum view) { RadioOptions = view; switch (view) { case ViewEnum.Orig: IsFirstTabVisible = Visibility.Visible; IsSecondTabVisible = Visibility.Collapsed; Selected = 0; break; case ViewEnum.Mem: IsFirstTabVisible = Visibility.Collapsed; IsSecondTabVisible = Visibility.Visible; Selected = 1; break; default: IsFirstTabVisible = IsSecondTabVisible = Visibility.Visible; break; } OnPropertyChanged("RadioOptions"); }
public void ReadXml(System.Xml.XmlReader r) { bool wasEmpty = r.IsEmptyElement; if (wasEmpty) return; _variable = r.GetAttribute("Map"); r.Read(); //<AddressInstance> _startAddress = Convert.ToUInt32(r.ReadElementContentAsString(), 16); _X = r.ReadElementContentAsInt(); _Y = r.ReadElementContentAsInt(); _mapSize = r.ReadElementContentAsInt(); _value = r.ReadElementContentAsInt(); _byteOnCell = r.ReadElementContentAsInt(); _mapName = r.ReadElementContentAsString(); _comment = r.ReadElementContentAsString(); r.Read(); { //<FRom> _sizeOfCellX = r.ReadElementContentAsInt(); _sizeOfCellY = r.ReadElementContentAsInt(); _loColor = (int)Convert.ToUInt32(r.ReadElementContentAsString(), 16); _hiColor = (int)Convert.ToUInt32(r.ReadElementContentAsString(), 16); _xSatteliteConstName = r.ReadElementContentAsString(); _ySatteliteConstName = r.ReadElementContentAsString(); _hide = r.ReadElementContentAsBoolean(); _flip = r.ReadElementContentAsBoolean(); _mask = (byte)r.ReadElementContentAsInt(); _mapView = (ViewEnum)r.ReadElementContentAsInt(); } r.ReadEndElement(); //</FRom> r.ReadEndElement(); //</AddressInstance> }
/// <summary> /// Returns namespace that the object belongs to. /// </summary> /// <returns>namespace</returns> public static string GetNamespace(this ViewEnum value) { switch (value) { case ViewEnum.LENGTH_WINDOW: return("win"); case ViewEnum.TIME_WINDOW: return("win"); case ViewEnum.KEEPALL_WINDOW: return("win"); case ViewEnum.TIME_BATCH: return("win"); case ViewEnum.TIME_LENGTH_BATCH: return("win"); case ViewEnum.LENGTH_BATCH: return("win"); case ViewEnum.SORT_WINDOW: return("ext"); case ViewEnum.RANK_WINDOW: return("ext"); case ViewEnum.TIME_ACCUM: return("win"); case ViewEnum.UNIQUE_BY_PROPERTY: return("std"); case ViewEnum.UNIQUE_FIRST_BY_PROPERTY: return("std"); case ViewEnum.FIRST_TIME_WINDOW: return("win"); case ViewEnum.TIME_ORDER: return("ext"); case ViewEnum.TIMETOLIVE: return("ext"); case ViewEnum.EXT_TIMED_BATCH: return("win"); case ViewEnum.EXT_TIMED_WINDOW: return("win"); case ViewEnum.LAST_EVENT: return("std"); case ViewEnum.FIRST_EVENT: return("std"); case ViewEnum.FIRST_LENGTH_WINDOW: return("win"); case ViewEnum.SIZE: return("std"); case ViewEnum.UNIVARIATE_STATISTICS: return("stat"); case ViewEnum.WEIGHTED_AVERAGE: return("stat"); case ViewEnum.REGRESSION_LINEST: return("stat"); case ViewEnum.CORRELATION: return("stat"); case ViewEnum.GROUP_MERGE: return("std"); case ViewEnum.GROUP_PROPERTY: return("std"); case ViewEnum.EXPRESSION_BATCH_WINDOW: return("win"); case ViewEnum.EXPRESSION_WINDOW: return("win"); } throw new ArgumentException("invalid value", nameof(value)); }
public TeamCreateViewModel() { Team = new Team(); ProjectId = 0; from = ViewEnum.TeamIndex; }
private void OnChangeViewEvent(ViewEnum e) { var handler = ChangeViewEvent; if (handler != null) handler(this, e); }
//[XmlIgnore] //public bool ViewSpecified { get { return View != null; } } public BlockActivity() { View = ViewEnum.Collapsed; }
/// <summary> /// Initializes a new instance of the <see cref="ChannelPrivacy" /> class. /// </summary> /// <param name="view">The privacy setting of the channel. Option descriptions: * `anybody` - Anyone can access the channel. * `moderators` - Only moderators can access the channel. * `users` - Only registered users can access the channel. (required).</param> public ChannelPrivacy(ViewEnum view = default(ViewEnum)) { this.View = view; }
/// <summary> /// Initializes a new instance of the <see cref="AlbumPrivacy" /> class. /// </summary> /// <param name="password">The showcase's password. This field appears only when **privacy.view** is `password`..</param> /// <param name="view">The access level of the showcase. Option descriptions: * `anybody` - Anyone can access the showcase. * `embed_only` - The showcase doesn't appear on Vimeo, but the owner can embed it on other sites. * `nobody` - No one can access the showacse, including the owner. * `password` - Only those with the password can access the showcase. * `team` - Only the owner and members of the owner's team can access the showcase. (required).</param> public AlbumPrivacy(string password = default(string), ViewEnum view = default(ViewEnum)) { this.View = view; this.Password = password; }
/// <summary> Gets the view's factory class.</summary> /// <returns> view's factory class /// </returns> public static Type GetFactoryType(this ViewEnum viewEnum) { switch (viewEnum) { case ViewEnum.LENGTH: return(typeof(LengthWindowViewFactory)); case ViewEnum.FIRST_LENGTH_WINDOW: return(typeof(FirstLengthWindowViewFactory)); case ViewEnum.LENGTH_BATCH: return(typeof(LengthBatchViewFactory)); case ViewEnum.TIME_WINDOW: return(typeof(TimeWindowViewFactory)); case ViewEnum.FIRST_TIME_WINDOW: return(typeof(FirstTimeViewFactory)); case ViewEnum.TIME_BATCH: return(typeof(TimeBatchViewFactory)); case ViewEnum.TIME_LENGTH_BATCH: return(typeof(TimeLengthBatchViewFactory)); case ViewEnum.TIME_ACCUM: return(typeof(TimeAccumViewFactory)); case ViewEnum.EXT_TIMED_WINDOW: return(typeof(ExternallyTimedWindowViewFactory)); case ViewEnum.EXT_TIMED_BATCH: return(typeof(ExternallyTimedBatchViewFactory)); case ViewEnum.KEEPALL_WINDOW: return(typeof(KeepAllViewFactory)); case ViewEnum.SIZE: return(typeof(SizeViewFactory)); case ViewEnum.LAST_EVENT: return(typeof(LastElementViewFactory)); case ViewEnum.FIRST_EVENT: return(typeof(FirstElementViewFactory)); case ViewEnum.UNIQUE_BY_PROPERTY: return(typeof(UniqueByPropertyViewFactory)); case ViewEnum.UNIQUE_FIRST_BY_PROPERTY: return(typeof(FirstUniqueByPropertyViewFactory)); case ViewEnum.GROUP_MERGE: return(typeof(MergeViewFactory)); case ViewEnum.GROUP_PROPERTY: return(typeof(GroupByViewFactory)); case ViewEnum.UNIVARIATE_STATISTICS: return(typeof(UnivariateStatisticsViewFactory)); case ViewEnum.WEIGHTED_AVERAGE: return(typeof(WeightedAverageViewFactory)); case ViewEnum.CORRELATION: return(typeof(CorrelationViewFactory)); case ViewEnum.REGRESSION_LINEST: return(typeof(RegressionLinestViewFactory)); case ViewEnum.SORT_WINDOW: return(typeof(SortWindowViewFactory)); case ViewEnum.RANK_WINDOW: return(typeof(RankWindowViewFactory)); case ViewEnum.TIME_ORDER: return(typeof(TimeOrderViewFactory)); case ViewEnum.PRIOR_EVENT_VIEW: return(typeof(PriorEventViewFactory)); case ViewEnum.INTERNAL_UNION: return(typeof(UnionViewFactory)); case ViewEnum.INTERNAL_INTERSECT: return(typeof(IntersectViewFactory)); case ViewEnum.INTERNAL_MATCH_RECOG: return(typeof(EventRowRegexNFAViewFactory)); case ViewEnum.EXPRESSION_WINDOW: return(typeof(ExpressionWindowViewFactory)); case ViewEnum.EXPRESSION_BATCH_WINDOW: return(typeof(ExpressionBatchViewFactory)); case ViewEnum.NOOP_WINDOW: return(typeof(NoopViewFactory)); } throw new ArgumentException("invalid value", "viewEnum"); }
/// <summary> Returns name of the view that can be used to reference the view in a view expression.</summary> /// <returns> short name of view /// </returns> public static string GetName(this ViewEnum viewEnum) { switch (viewEnum) { case ViewEnum.LENGTH: return("length"); case ViewEnum.FIRST_LENGTH_WINDOW: return("firstlength"); case ViewEnum.LENGTH_BATCH: return("length_batch"); case ViewEnum.TIME_WINDOW: return("time"); case ViewEnum.FIRST_TIME_WINDOW: return("firsttime"); case ViewEnum.TIME_BATCH: return("time_batch"); case ViewEnum.TIME_LENGTH_BATCH: return("time_length_batch"); case ViewEnum.TIME_ACCUM: return("time_accum"); case ViewEnum.EXT_TIMED_WINDOW: return("ext_timed"); case ViewEnum.EXT_TIMED_BATCH: return("ext_timed_batch"); case ViewEnum.KEEPALL_WINDOW: return("keepall"); case ViewEnum.SIZE: return("size"); case ViewEnum.LAST_EVENT: return("lastevent"); case ViewEnum.FIRST_EVENT: return("firstevent"); case ViewEnum.UNIQUE_BY_PROPERTY: return("unique"); case ViewEnum.UNIQUE_FIRST_BY_PROPERTY: return("firstunique"); case ViewEnum.GROUP_MERGE: return("merge"); case ViewEnum.GROUP_PROPERTY: return("groupwin"); case ViewEnum.UNIVARIATE_STATISTICS: return("uni"); case ViewEnum.WEIGHTED_AVERAGE: return("weighted_avg"); case ViewEnum.CORRELATION: return("correl"); case ViewEnum.REGRESSION_LINEST: return("linest"); case ViewEnum.SORT_WINDOW: return("sort"); case ViewEnum.RANK_WINDOW: return("rank"); case ViewEnum.TIME_ORDER: return("time_order"); case ViewEnum.PRIOR_EVENT_VIEW: return("prioreventinternal"); case ViewEnum.INTERNAL_UNION: return("union"); case ViewEnum.INTERNAL_INTERSECT: return("intersect"); case ViewEnum.INTERNAL_MATCH_RECOG: return("match_recognize"); case ViewEnum.EXPRESSION_WINDOW: return("expr"); case ViewEnum.EXPRESSION_BATCH_WINDOW: return("expr_batch"); case ViewEnum.NOOP_WINDOW: return("noop"); } throw new ArgumentException("invalid value", "viewEnum"); }
private void showView(ViewEnum view) { var currentView = _views[(int)view]; copyDimensions(panelList, panelOptions); copyDimensions(panelList, panelAbout); copyDimensions(gemList, searchResultsList); panelList.Visible = view == ViewEnum.AvailableGems || view == ViewEnum.SearchResults; gemList.Visible = view == ViewEnum.AvailableGems; searchResultsList.Visible = view == ViewEnum.SearchResults; panelOptions.Visible = view == ViewEnum.Options; panelAbout.Visible = view == ViewEnum.About; switch (view) { case ViewEnum.AvailableGems: break; case ViewEnum.SearchResults: break; case ViewEnum.Options: showConfig(); break; case ViewEnum.About: break; } if (_lastView != null) { _lastView.ForeColor = SystemColors.WindowText; _lastView.BackColor = SystemColors.Window; } currentView.ForeColor = SystemColors.HighlightText; currentView.BackColor = SystemColors.Highlight; _lastView = currentView; _activeView = view; }
public View(ViewEnum view) { _view = view; }
public object this[int x, int y, ViewEnum? view] { get { #if DEBUG tmr.Start(0); #endif //view = _adr.MapView; //if (_mapObj[x, y] != null) return _mapObj[x, y]; //если параметр null, то берем текущее отображение if (view == null) view = _adr.MapView; uint raw = this[x, y]; object obj = null;// = (float)raw; switch (view) { case ViewEnum.Raw: obj = raw; break; case ViewEnum.RawHex: obj = Convert.ToString(raw, 16); break; case ViewEnum.Filtered: if (raw > 128) obj = (float)raw - 192; else obj = raw; break; case ViewEnum.InjectorMS: break; case ViewEnum.AFRatio: break; case ViewEnum.InjDutyCycle: break; case ViewEnum.EstHP: break; case ViewEnum.Scale: obj = raw * _adr.ValueOfElement; break; default: break; } //_mapObj[x, y] = obj; #if DEBUG tmr.Write(0); #endif return obj; } set { if (_mapObj[x, y] == value) return; else _mapObj[x, y] = null; //если параметр null, то берем текущее отображение if (view == null) view = _adr.MapView; uint oldVal = this[x, y]; //текущее значение uint newVal = (uint)value; switch (view) { case ViewEnum.Raw: break; case ViewEnum.RawHex: newVal = Convert.ToUInt32(value.ToString(), 16); break; case ViewEnum.Filtered: if (oldVal > 128) newVal = oldVal + 192; break; case ViewEnum.InjectorMS: break; case ViewEnum.AFRatio: break; case ViewEnum.InjDutyCycle: break; case ViewEnum.EstHP: break; default: break; } this[x, y] = newVal; } }
/// <summary> /// Initializes a new instance of the <see cref="ProjectPrivacy" /> class. /// </summary> /// <param name="view">The privacy setting for accessing the folder. Option descriptions: * `anybody` - Anyone with the link can access the contents of the folder. * `nobody` - Only the owner and those team members that the owner has explicitly invited can access the contents of the folder. * `team` - Only those team members with the link can access the contents of the folder. (required).</param> public ProjectPrivacy(ViewEnum view = default(ViewEnum)) { this.View = view; }
/// <summary> /// Returns name of the view that can be used to reference the view in a view expression. /// </summary> /// <returns>short name of view</returns> public static string GetViewName(this ViewEnum value) { switch (value) { case ViewEnum.LENGTH_WINDOW: return("length"); case ViewEnum.TIME_WINDOW: return("time"); case ViewEnum.KEEPALL_WINDOW: return("keepall"); case ViewEnum.TIME_BATCH: return("time_batch"); case ViewEnum.TIME_LENGTH_BATCH: return("time_length_batch"); case ViewEnum.LENGTH_BATCH: return("length_batch"); case ViewEnum.SORT_WINDOW: return("sort"); case ViewEnum.RANK_WINDOW: return("rank"); case ViewEnum.TIME_ACCUM: return("time_accum"); case ViewEnum.UNIQUE_BY_PROPERTY: return("unique"); case ViewEnum.UNIQUE_FIRST_BY_PROPERTY: return("firstunique"); case ViewEnum.FIRST_TIME_WINDOW: return("firsttime"); case ViewEnum.TIME_ORDER: return("time_order"); case ViewEnum.TIMETOLIVE: return("timetolive"); case ViewEnum.EXT_TIMED_BATCH: return("ext_timed_batch"); case ViewEnum.EXT_TIMED_WINDOW: return("ext_timed"); case ViewEnum.LAST_EVENT: return("lastevent"); case ViewEnum.FIRST_EVENT: return("firstevent"); case ViewEnum.FIRST_LENGTH_WINDOW: return("firstlength"); case ViewEnum.SIZE: return("size"); case ViewEnum.UNIVARIATE_STATISTICS: return("uni"); case ViewEnum.WEIGHTED_AVERAGE: return("weighted_avg"); case ViewEnum.REGRESSION_LINEST: return("linest"); case ViewEnum.CORRELATION: return("correl"); case ViewEnum.GROUP_MERGE: return("merge"); case ViewEnum.GROUP_PROPERTY: return("groupwin"); case ViewEnum.EXPRESSION_BATCH_WINDOW: return("expr_batch"); case ViewEnum.EXPRESSION_WINDOW: return("expr"); } throw new ArgumentException("invalid value", nameof(value)); }
public Window GetView(ViewEnum view) { var returnView = factoryView.Return(view); return(returnView.ReturnView()); }
/// <summary> /// Returns a view's factory class. /// </summary> /// <returns>class of view factory</returns> public static Type GetFactoryClass(this ViewEnum value) { switch (value) { case ViewEnum.LENGTH_WINDOW: return(typeof(LengthWindowViewForge)); case ViewEnum.TIME_WINDOW: return(typeof(TimeWindowViewForge)); case ViewEnum.KEEPALL_WINDOW: return(typeof(KeepAllViewForge)); case ViewEnum.TIME_BATCH: return(typeof(TimeBatchViewForge)); case ViewEnum.TIME_LENGTH_BATCH: return(typeof(TimeLengthBatchViewForge)); case ViewEnum.LENGTH_BATCH: return(typeof(LengthBatchViewForge)); case ViewEnum.SORT_WINDOW: return(typeof(SortWindowViewForge)); case ViewEnum.RANK_WINDOW: return(typeof(RankWindowViewForge)); case ViewEnum.TIME_ACCUM: return(typeof(TimeAccumViewForge)); case ViewEnum.UNIQUE_BY_PROPERTY: return(typeof(UniqueByPropertyViewForge)); case ViewEnum.UNIQUE_FIRST_BY_PROPERTY: return(typeof(FirstUniqueByPropertyViewForge)); case ViewEnum.FIRST_TIME_WINDOW: return(typeof(FirstTimeViewForge)); case ViewEnum.TIME_ORDER: return(typeof(TimeOrderViewForge)); case ViewEnum.TIMETOLIVE: return(typeof(TimeToLiveViewForge)); case ViewEnum.EXT_TIMED_BATCH: return(typeof(ExternallyTimedBatchViewForge)); case ViewEnum.EXT_TIMED_WINDOW: return(typeof(ExternallyTimedWindowViewForge)); case ViewEnum.LAST_EVENT: return(typeof(LastEventViewForge)); case ViewEnum.FIRST_EVENT: return(typeof(FirstEventViewForge)); case ViewEnum.FIRST_LENGTH_WINDOW: return(typeof(FirstLengthWindowViewForge)); case ViewEnum.SIZE: return(typeof(SizeViewForge)); case ViewEnum.UNIVARIATE_STATISTICS: return(typeof(UnivariateStatisticsViewForge)); case ViewEnum.WEIGHTED_AVERAGE: return(typeof(WeightedAverageViewForge)); case ViewEnum.REGRESSION_LINEST: return(typeof(RegressionLinestViewForge)); case ViewEnum.CORRELATION: return(typeof(CorrelationViewForge)); case ViewEnum.GROUP_MERGE: return(typeof(MergeViewFactoryForge)); case ViewEnum.GROUP_PROPERTY: return(typeof(GroupByViewFactoryForge)); case ViewEnum.EXPRESSION_BATCH_WINDOW: return(typeof(ExpressionBatchViewForge)); case ViewEnum.EXPRESSION_WINDOW: return(typeof(ExpressionWindowViewForge)); } throw new ArgumentException("invalid value", nameof(value)); }