• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ViewMode类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ViewMode的典型用法代码示例。如果您正苦于以下问题:C# ViewMode类的具体用法?C# ViewMode怎么用?C# ViewMode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ViewMode类属于命名空间,在下文中一共展示了ViewMode类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: RoomDlg

        public RoomDlg(Room room, AdvData data, ViewMode mode, MainForm parent, Form mdiParent)
        {
            InitializeComponent();
            mRoom = room;
            mData = data;
            mMode = mode;
            updateRoom();

            this.ClientSize = new Size(data.WindowXRes, data.Settings.Resolution.y);
            this.Paint += new PaintEventHandler(RoomDlg_Paint);
            this.MouseDown += new MouseEventHandler(RoomDlg_MouseDown);
            this.MouseMove += new MouseEventHandler(RoomDlg_MouseMove);
            this.MouseUp += new MouseEventHandler(RoomDlg_MouseUp);
            this.DoubleClick += new EventHandler(RoomDlg_DoubleClick);
            this.KeyPress += new KeyPressEventHandler(RoomDlg_KeyPress);
            this.FormClosed += new FormClosedEventHandler(RoomDlg_FormClosed);
            this.DragOver += new DragEventHandler(RoomDlg_DragOver);
            this.DragDrop += new DragEventHandler(RoomDlg_DragDrop);
            mControl = new RoomCtrlDlg(room, data, parent);
            mControl.MdiParent = mdiParent;
            mControl.Location = new Point(Screen.GetWorkingArea(this).Width-mControl.Width, 0);
            mControl.StartPosition = FormStartPosition.Manual;
            mControl.Show();
            mControl.RedrawRoom += new RoomCtrlDlg.RedrawEventHandler(mControl_RedrawRoom);
            mTimer = new Timer();
            mTimer.Tick += new EventHandler(mTimer_Tick);
            mTimer.Interval = 50;
            mTimer.Start();
            mOwner = parent;
        }
开发者ID:captain-mayhem,项目名称:captainsengine,代码行数:30,代码来源:RoomDlg.cs


示例2: TextViewForm

        public TextViewForm(string text, ViewMode mode)
        {
            InitializeComponent();

            _text = text;
            _mode = mode;
        }
开发者ID:lidonghao1116,项目名称:ProjectManager,代码行数:7,代码来源:TextViewForm.cs


示例3: UserFormViewModel

 public UserFormViewModel(string[] allRoles, string[] userRoles, MembershipUser user, ViewMode mode)
 {
     AllRoles = allRoles;
     UserRoles = userRoles;
     User = user;
     Mode = mode;
 }
开发者ID:abordt,项目名称:Viking,代码行数:7,代码来源:UserFormViewModel.cs


示例4: Viewer

        public Viewer(Workspace workspace)
        {
            if (workspace == null) throw new ArgumentNullException("workspace");
            this.workspace = workspace;

            graphicsDevice = workspace.GraphicsDevice;

            CameraView = new ChaseView
            {
                Distance = 3.5f,
                Angle = new Vector2(-MathHelper.PiOver4 * 0.5f, MathHelper.PiOver4)
            };

            CurrentView = CameraView;
            viewMode = ViewMode.Camera;

            Projection = new PerspectiveFov
            {
                NearPlaneDistance = 0.01f,
                FarPlaneDistance = 10
            };

            DirectionalLightModel0 = new DirectionalLightModel
            {
                Enabled = true,
                DiffuseColor = Vector3.One
            };
            DirectionalLightModel1 = new DirectionalLightModel { Enabled = false };
            DirectionalLightModel2 = new DirectionalLightModel { Enabled = false };

            AmbientLightColor = new Vector3(0.05333332f, 0.09882354f, 0.1819608f);

            CameraMoveScale = 0.05f;
        }
开发者ID:willcraftia,项目名称:Blocks,代码行数:34,代码来源:Viewer.cs


示例5: EditPerson

 public void EditPerson(Person person)
 {
     _mode = ViewMode.Edit;
     _view.Title = "Edit Person";
     _person = person;
     DisplayPerson();
 }
开发者ID:JHardin1112,项目名称:winforms-mvp-example,代码行数:7,代码来源:PersonDetailsPresenter.cs


示例6: ShowPerson

 public void ShowPerson(Person person)
 {
     _mode = ViewMode.View;
     _view.Title = "View Person";
     _person = person;
     DisplayPerson();
 }
开发者ID:JHardin1112,项目名称:winforms-mvp-example,代码行数:7,代码来源:PersonDetailsPresenter.cs


示例7: DetermineFocus

 public void DetermineFocus() {
     if (Input.GetKey(KeyCode.F)) {
         //Selection.GetCurrentSelectionTransform();
         if (focus) {
             viewMode = ViewMode.Locked;
         }
     }
 }
开发者ID:weichx,项目名称:AbilitySystem,代码行数:8,代码来源:GameCamera.cs


示例8: ListSet

        public ListSet()
        {
            InitializeComponent();

            currentViewMode = ViewMode.Cat;

            updateButtons();
        }
开发者ID:skaulana,项目名称:eflash,代码行数:8,代码来源:ListSet.cs


示例9: ReloadFromDisk

        /// <summary>Discard all changes and reload the the current hosts file.</summary>
        /// <param name="currentView">The current view.</param>
        public void ReloadFromDisk(ViewMode currentView)
        {
            if (this.Reload == null)
            {
                return;
            }

            ViewModeEventArgs e = new ViewModeEventArgs(currentView, null);
            this.Reload(this, e);
        }
开发者ID:andreaskoch,项目名称:Hostfile-Manager,代码行数:12,代码来源:ViewModelBase.cs


示例10: CopyToClipboard

        /// <summary>
        /// Copy the current application state to the user's clipboard.
        /// </summary>
        /// <param name="currentView">The current <see cref="ViewMode"/>.</param>
        public void CopyToClipboard(ViewMode currentView)
        {
            if (this.Copy == null)
            {
                return;
            }

            ViewModeEventArgs e = new ViewModeEventArgs(currentView, null);
            this.Copy(this, e);
        }
开发者ID:andreaskoch,项目名称:Hostfile-Manager,代码行数:14,代码来源:ViewModelBase.cs


示例11: Window_Loaded

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            // Подписываемся на глобальные события

            Global.CurrentArticleOpened += CurrentArticleOpenedHandler;
            Global.AfterCurrentWorkspaceSet += CurrentWorkspaceSetHandler;
            Global.UILanguageChanged += UILanguageChangedHandler;

            // При первом показе окна переходим в вид незагруженной рабочей области
            CurrentViewMode = ViewMode.WorkspaceIsNotLoaded;           
        }
开发者ID:UltimaBeaR,项目名称:FLangDictionary,代码行数:11,代码来源:MainWindow.xaml.cs


示例12: has_valid_form_values

        private bool has_valid_form_values(FormCollection formCollection, ViewMode mode)
        {
            if (mode == ViewMode.Create)
            {
                if(!Extensions.StringHasValue(formCollection["Role"]))
                {
                    ModelState.AddModelError("_FORM", "Role is a required field");
                }
                else if (Roles.RoleExists(formCollection["Role"]))
                {
                    ModelState.AddModelError("_FORM", "The role already exists");
                }
            }

            return ModelState.IsValid;
        }
开发者ID:abordt,项目名称:Viking,代码行数:16,代码来源:UserRoleController.cs


示例13: WithMode

        private void WithMode(ViewMode mode)
        {
            this.ImagesListView1.Visibility = this.ImagesListView2.Visibility = Visibility.Collapsed;
            switch (mode)
            {
                case ViewMode.Mode1:
                    this.ImagesListView1.Visibility = Visibility.Visible;
                    break;

                case ViewMode.Mode2:
                    this.ImagesListView2.Visibility = Visibility.Visible;
                    break;

                default:
                    throw new ArgumentOutOfRangeException(nameof(mode), mode, null);
            }
        }
开发者ID:Cologler,项目名称:JRYVideo,代码行数:17,代码来源:WebImageSelectorWindow.xaml.cs


示例14: View

        /// <summary>
        /// Initializes a new instance of the <c>View</c> class.
        /// </summary>
        public View(string name)
            : base(name, DxfObjectCode.View, true)
        {
            if (string.IsNullOrEmpty(name))
                throw new ArgumentNullException("name", "The view name should be at least one character long.");

            this.reserved = false;
            this.target = Vector3.Zero;
            this.camera = Vector3.UnitZ;
            this.height = 1.0;
            this.width = 1.0;
            this.rotation = 0.0;
            this.viewmode = ViewMode.Off;
            this.fov = 40.0;
            this.frontClippingPlane = 0.0;
            this.backClippingPlane = 0.0;
        }
开发者ID:NTUST-PTL,项目名称:PTL-Project,代码行数:20,代码来源:View.cs


示例15: CalculateTranslation

    private void CalculateTranslation() {

        if (viewMode == ViewMode.Locked) {
            if (focus == null) {
                viewMode = ViewMode.Free;
            }
            else {
                transform.position = focus.transform.position;
            }
        }

        float xChange = 0;
        float yChange = 0;
        float zChange = 0;

        if (Input.GetKey(KeyCode.W)) {
            zChange = zSpeed;
        }
        else if (Input.GetKey(KeyCode.S)) {
            zChange = -zSpeed;
        }

        if (Input.GetKey(KeyCode.D)) {
            xChange = xSpeed;
        }
        else if (Input.GetKey(KeyCode.A)) {
            xChange = -xSpeed;
        }

        if (Input.GetKey(KeyCode.E)) {
            yChange = ySpeed;
        }
        else if (Input.GetKey(KeyCode.Q)) {
            yChange = -ySpeed;
        }

        if (zChange != 0 || xChange != 0 || yChange != 0) {
            viewMode = ViewMode.Free;
        }

        transform.Translate(new Vector3(xChange, yChange, zChange) * Time.deltaTime);
    }
开发者ID:weichx,项目名称:AbilitySystem,代码行数:42,代码来源:GameCamera.cs


示例16: switchMode

    public void switchMode()
    {
        switch (viewMode)
        {
            case ViewMode.editor:
                setActive(editorObjects, editorComponents, false);
                setActive(gameObjects, gameComponents, true);
                viewMode = ViewMode.game;
                break;

            case ViewMode.game:
                setActive(editorObjects, editorComponents, true);
                setActive(gameObjects, gameComponents, false);
                viewMode = ViewMode.editor;
                break;

            default:
                Debug.LogError("ViewMode");
                break;
        }
    }
开发者ID:Seraphli,项目名称:TheInsectersWar,代码行数:21,代码来源:EditorViewSwitch.cs


示例17: Application_Startup

 private void Application_Startup(object sender, StartupEventArgs e)
 {
     this.RootVisual = new MainPage();
        if (e.InitParams.ContainsKey("viewMode"))
        this.viewMode = e.InitParams["viewMode"] == "facebook" ? ViewMode.Facebook : ViewMode.Normal;
        if (this.viewMode == ViewMode.Facebook)
        {
        if (e.InitParams.ContainsKey("uid"))
        {
            string id = e.InitParams["uid"];
            InitFacebookLogin(id);
        }
        if (e.InitParams.ContainsKey("firstName"))
        {
            firstName = e.InitParams["firstName"];
        }
        if (e.InitParams.ContainsKey("photo"))
        {
            photoUrl = e.InitParams["photo"];
        }
        }
     App.UIThread.Dispatcher = RootVisual.Dispatcher;
 }
开发者ID:MaozGelbart,项目名称:cs-whist-2010,代码行数:23,代码来源:App.xaml.cs


示例18: PicsViewModel

        public PicsViewModel()
        {
            FilePath path = FilePath.Make(@"f:\download\data.dat");
            _library = new Library.FileIndex(path);
             /*
            _library.AddDirectory("F:\\Photos\\Amsterdam 2010\\England");
            */



            _libraryViewModel = new ImageListViewModel(_library);

            _imageCtrlViewModel = new ImageCtrlViewModel(_libraryViewModel);
            _libraryCtrlViewModel = new LibraryCtrlViewModel(_libraryViewModel);

            _imageCtrlViewModel.PropertyChanged += _imageCtrlViewModel_PropertyChanged;

            _imageCtrlViewModel.SetList(_libraryViewModel, _libraryViewModel[0]);

            _viewMode = PicsViewModel.ViewMode.Content;
            ViewModeChanged();

        }
开发者ID:JadeHub,项目名称:Pics,代码行数:23,代码来源:PicsViewModel.cs


示例19: CurrentArticleOpenedHandler

 // Вызывается при событии смены текущей рабочей области
 private void CurrentArticleOpenedHandler(object sender, EventArgs e)
 {
     // Если Статей не осталось (после удаления всех статей) - открываем экран с сообщением что нет статей
     if (Global.CurrentWorkspace.ArticleNames.Length == 0)
         CurrentViewMode = ViewMode.NoArticles;
     // Если статья меняется, в то время как был пустой режим
     // (После добавления первой статьи  сразу или после открытия рабочей области) - открываем режим чтения как дефолтный
     else if (CurrentViewMode == ViewMode.None || CurrentViewMode == ViewMode.NoArticles)
         CurrentViewMode = ViewMode.Learn;
 }
开发者ID:UltimaBeaR,项目名称:FLangDictionary,代码行数:11,代码来源:MainWindow.xaml.cs


示例20: MenuItem_View_Learn_Click

 private void MenuItem_View_Learn_Click(object sender, RoutedEventArgs e)
 {
     if (Global.CurrentWorkspace != null && Global.CurrentWorkspace.CurrentArticle != null)
     {
         CurrentViewMode = ViewMode.Learn;
     }
 }
开发者ID:UltimaBeaR,项目名称:FLangDictionary,代码行数:7,代码来源:MainWindow.xaml.cs



注:本文中的ViewMode类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ViewModel类代码示例发布时间:2022-05-24
下一篇:
C# ViewLocationResult类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap