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

C# OS类代码示例

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

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



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

示例1: Platform

        static Platform()
        {
            var p = (int) Environment.OSVersion.Platform;
            OS = ((p == 4) || (p == 6) || (p == 128)) ? OS.Unix : OS.Windows;

            Runtime = (Type.GetType("Mono.Runtime") == null) ? Runtime.Mono : Runtime.DotNet;
        }
开发者ID:0x0all,项目名称:FFTTools,代码行数:7,代码来源:Platform.cs


示例2: Add

        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(OS.Model.configs.yl_temp model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into yl_temp(");
            strSql.Append("name,title,status)");
            strSql.Append(" values (");
            strSql.Append("@name,@title,@status)");
            strSql.Append(";select @@IDENTITY");
            SqlParameter[] parameters = {
                    new SqlParameter("@name", SqlDbType.NVarChar,100),
                    new SqlParameter("@title", SqlDbType.NVarChar,100),
                    new SqlParameter("@status", SqlDbType.Int,4)};
            parameters[0].Value = model.name;
            parameters[1].Value = model.title;
            parameters[2].Value = model.status;

            object obj = DbHelperSQL.GetSingle(strSql.ToString(),parameters);
            if (obj == null)
            {
                return 0;
            }
            else
            {
                return Convert.ToInt32(obj);
            }
        }
开发者ID:eyren,项目名称:OScms,代码行数:29,代码来源:yl_temp.cs


示例3: btnSalvar_Click

    protected void btnSalvar_Click(object sender, EventArgs e)
    {
        //validação no servidor
        if ( String.IsNullOrEmpty( txtLoja.Text.Trim() ))
        {
            lblMensagem.Text = "Digite uma loja!";
            return;
        }

        OS os = new OS();
        OSBD bd = new OSBD();

        os.Loja = txtLoja.Text;
        os.Observacao = txtObs.Text;
        os.Ativado = true;

        if ( bd.Insert(os) )
        {
            Session["LOJA"] = null;
            Session["OBS"] = null;
            lblMensagem.Text = "OS Cadastrada com Sucesso!";
            txtLoja.Text = "";
            txtObs.Text = "";
            Session["OS"] = ProximaOs();
            txtOs.Text = Convert.ToString(Session["OS"]);
            gvAlianca.DataSource = null;
            gvAlianca.DataBind();
        }
        else
        {
            lblMensagem.Text = "Houve um erro ao cadastrar!";
        }
    }
开发者ID:JuanSabino,项目名称:3--Semestre,代码行数:33,代码来源:Cadastrar.aspx.cs


示例4: PathItem

 public PathItem(OS.OSInformation osInformation, string key, string path)
 {
     _osName = osInformation.OSName;
     _version = osInformation.Version;
     _key = key;
     _path = path;
 }
开发者ID:Postremus,项目名称:UniTTT,代码行数:7,代码来源:PathItem.cs


示例5: NewAzureQuickVMCmdletInfo

 public NewAzureQuickVMCmdletInfo(OS os, string name, string serviceName, string imageName, string instanceSize,
     string userName, string password, string vNetName, string[] subnetNames, string affinityGroup, string reservedIP)
     : this(os, name, serviceName, imageName, userName, password)
 {
     if (!string.IsNullOrEmpty(affinityGroup))
     {
         cmdletParams.Add(new CmdletParam("AffinityGroup", affinityGroup));
     }
     if (!string.IsNullOrEmpty(instanceSize))
     {
         cmdletParams.Add(new CmdletParam("InstanceSize", instanceSize));
     }
     if (!string.IsNullOrEmpty(vNetName))
     {
         cmdletParams.Add(new CmdletParam("VNetName", vNetName));
     }
     if (subnetNames != null)
     {
         cmdletParams.Add(new CmdletParam("SubnetNames", subnetNames));
     }
     if (!string.IsNullOrEmpty(reservedIP))
     {
         cmdletParams.Add(new CmdletParam("ReservedIPName", reservedIP));
     }
 }
开发者ID:kenazk,项目名称:azure-sdk-tools,代码行数:25,代码来源:NewAzureQuickVMCmdletInfo.cs


示例6: Platform

      static Platform()
      {
         int p = (int)Environment.OSVersion.Platform;
         _os = ((p == 4) || (p == 128)) ? OS.Linux : OS.Windows;

         _runtime = (Type.GetType("System.MonoType", false) != null) ? Runtime.Mono : Runtime.DotNet;
      }
开发者ID:AnthonyNystrom,项目名称:Pikling,代码行数:7,代码来源:Platform.cs


示例7: NewAzureQuickVMCmdletInfo

        public NewAzureQuickVMCmdletInfo(OS os, string name, string serviceName, string imageName, string userName, string password)
        {
            cmdletName = Utilities.NewAzureQuickVMCmdletName;

            if (os == OS.Windows)
            {
                cmdletParams.Add(new CmdletParam("Windows", null));
                if (!string.IsNullOrWhiteSpace(userName))
                {
                    cmdletParams.Add(new CmdletParam("AdminUsername", userName));
                }
            }
            else
            {
                cmdletParams.Add(new CmdletParam("Linux", null));
                if (!string.IsNullOrWhiteSpace(userName))
                {
                    cmdletParams.Add(new CmdletParam("LinuxUser", userName));
                }
            }
            cmdletParams.Add(new CmdletParam("ImageName", imageName));
            cmdletParams.Add(new CmdletParam("Name", name));
            cmdletParams.Add(new CmdletParam("ServiceName", serviceName));
            if (!string.IsNullOrEmpty(password))
            {
                cmdletParams.Add(new CmdletParam("Password", password));
            }
        }
开发者ID:hovsepm,项目名称:azure-sdk-tools,代码行数:28,代码来源:NewAzureQuickVMCmdletInfo.cs


示例8: gvOS_RowCommand

    protected void gvOS_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        int index = 0;
        switch (e.CommandName)
        {
            case "fechar":
                index = Convert.ToInt32(e.CommandArgument);
                OS os = new OS();
                OSBD bd = new OSBD();
                os = bd.Select(index);
                string Data = os.HoraSaida.ToShortDateString();
                if (Data == "01/01/0001")
                {
                    Session["OS"] = index;
                    Response.Redirect("Fechar.aspx");
                    lblMensagem.Text = "";

                }
                else
                {
                    lblMensagem.Text = "OS já encerrada!";
                }

                break;
            default:
                break;
        }
    }
开发者ID:JuanSabino,项目名称:3--Semestre,代码行数:28,代码来源:Listar.aspx.cs


示例9: AddAzureVMImageCmdletInfo

 public AddAzureVMImageCmdletInfo(
     string imageName,
     string mediaLocation,
     OS os,
     string label,
     string recommendedSize,
     string description,
     string eula,
     string imageFamily,
     Uri privacyUri,
     DateTime publishedDate)
     : this(imageName, mediaLocation, os, label, recommendedSize)
 {
     if(!string.IsNullOrEmpty(description))
     {
         cmdletParams.Add(new CmdletParam("Description", description));
     }
     if(!string.IsNullOrEmpty(eula))
     {
         cmdletParams.Add(new CmdletParam("Eula", eula));
     }
     if(!string.IsNullOrEmpty(imageFamily))
     {
         cmdletParams.Add(new CmdletParam("ImageFamily", imageFamily));
     }
     if(privacyUri != null)
     {
         cmdletParams.Add(new CmdletParam("PrivacyUri", privacyUri.ToString()));
     }
     if(publishedDate != null)
     {
         cmdletParams.Add(new CmdletParam("PublishedDate", publishedDate.ToString()));
     }
 }
开发者ID:NordPool,项目名称:azure-sdk-tools,代码行数:34,代码来源:AddAzureVMImageCmdletInfo.cs


示例10: OnViewCreated

 public override void OnViewCreated(Views.View p0, OS.Bundle p1)
 {
     if (DialogAdapter == null) return;
     DialogAdapter.List = ListView;
     DialogAdapter.RegisterListView();
     base.OnViewCreated(p0, p1);
 }
开发者ID:rkamphorst,项目名称:Android.Dialog,代码行数:7,代码来源:DialogListFragment.cs


示例11: DrawUI

 public void DrawUI(Rectangle dest, OS os)
 {
     var ButtonHeight = (int) (GuiData.ActiveFontConfig.tinyFontCharHeight + 10.0);
     if (panel.PanelHeight != ButtonHeight + 4)
         panel = new ScrollableSectionedPanel(ButtonHeight + 4, GuiData.spriteBatch.GraphicsDevice);
     var items =
         BuildDirectoryDrawList(
             os.connectedComp == null ? os.thisComputer.files.root : os.connectedComp.files.root, 0, 0, os);
     panel.NumberOfPanels = items.Count;
     var width = dest.Width - 25;
     Action<int, Rectangle, SpriteBatch> DrawSection = (index, bounds, sb) =>
     {
         var lsItem = items[index];
         if (lsItem.IsEmtyDisplay)
         {
             TextItem.doFontLabel(new Vector2(bounds.X + 5 + lsItem.indent, bounds.Y + 2), "-Empty-",
                 GuiData.tinyfont, new Color?(), width, ButtonHeight);
         }
         else
         {
             if (
                 !Button.doButton(300000 + index, bounds.X + 5 + lsItem.indent, bounds.Y + 2,
                     width - lsItem.indent, ButtonHeight, lsItem.DisplayName, new Color?()))
                 return;
             lsItem.Clicked();
         }
     };
     Button.DisableIfAnotherIsActive = true;
     panel.Draw(DrawSection, GuiData.spriteBatch, dest);
     Button.DisableIfAnotherIsActive = false;
 }
开发者ID:strangea,项目名称:OpenHacknet,代码行数:31,代码来源:DisplayModuleLSHelper.cs


示例12: TestSaveLoadOnFile

 public static string TestSaveLoadOnFile(ScreenManager screenMan)
 {
     var text = "__hacknettestaccount";
     var pass = "__testingpassword";
     SaveFileManager.AddUser(text, pass);
     var saveFileNameForUsername = SaveFileManager.GetSaveFileNameForUsername(text);
     OS.TestingPassOnly = true;
     var text2 = "";
     var oS = new OS();
     oS.SaveGameUserName = saveFileNameForUsername;
     oS.SaveUserAccountName = text;
     screenMan.AddScreen(oS, screenMan.controllingPlayer);
     oS.threadedSaveExecute();
     var nodes = oS.netMap.nodes;
     screenMan.RemoveScreen(oS);
     OS.WillLoadSave = true;
     oS = new OS();
     oS.SaveGameUserName = saveFileNameForUsername;
     oS.SaveUserAccountName = text;
     screenMan.AddScreen(oS, screenMan.controllingPlayer);
     var text3 = "Serialization and Integrity Test Report:\r\n";
     Console.WriteLine(text3);
     text2 += text3;
     new List<string>();
     new List<string>();
     var num = 0;
     text2 += getTestingReportForLoadComparison(oS, nodes, num, out num);
     text2 = text2 + "\r\n" + TestMissions(oS);
     for (var i = 0; i < oS.netMap.nodes.Count; i++)
     {
         var root = oS.netMap.nodes[i].files.root;
         DeleteAllFilesRecursivley(root);
     }
     oS.SaveGameUserName = saveFileNameForUsername;
     oS.SaveUserAccountName = text;
     oS.threadedSaveExecute();
     nodes = oS.netMap.nodes;
     screenMan.RemoveScreen(oS);
     OS.WillLoadSave = true;
     oS = new OS();
     oS.SaveGameUserName = saveFileNameForUsername;
     oS.SaveUserAccountName = text;
     screenMan.AddScreen(oS, screenMan.controllingPlayer);
     var num2 = num;
     var testingReportForLoadComparison = getTestingReportForLoadComparison(oS, nodes, num, out num);
     if (num2 != num)
     {
         text2 = text2 + "\r\nAll Files Deleted pass:\r\n" + testingReportForLoadComparison;
     }
     screenMan.RemoveScreen(oS);
     OS.TestingPassOnly = false;
     SaveFileManager.DeleteUser(text);
     var text4 = string.Concat("\r\nTest complete - ", num, " errors found.\r\nTested ", nodes.Count,
         " generated nodes vs ", oS.netMap.nodes.Count, " loaded nodes");
     text2 += text4;
     Console.WriteLine(text4);
     MusicManager.stop();
     return text2;
 }
开发者ID:strangea,项目名称:OpenHacknet,代码行数:59,代码来源:TestSuite.cs


示例13: AddAzureVMImageCmdletInfo

 public AddAzureVMImageCmdletInfo(string imageName, string mediaLocation, OS os, string label, InstanceSize? recommendedSize)
     : this(imageName, mediaLocation, os, label)
 {
     if (recommendedSize.HasValue)
     {
         cmdletParams.Add(new CmdletParam("RecommendedVMSize", recommendedSize));
     }
 }
开发者ID:redwater,项目名称:azure-sdk-tools,代码行数:8,代码来源:AddAzureVMImageCmdletInfo.cs


示例14: OSModel

 public OSModel(OS os)
 {
     this.OSId = os.OSId;
     this.Version = os.Version;
     this.Desc = os.Desc;
     this.ReleaseDate = os.ReleaseDate;
     this.ExpirationDate = (os.ExpirationDate.HasValue) ? os.ExpirationDate : null;
 }
开发者ID:rsantos16,项目名称:CanIUpdate,代码行数:8,代码来源:OSModel.cs


示例15: NewAzureQuickVMCmdletInfo

 public NewAzureQuickVMCmdletInfo(OS os, string name, string serviceName, string imageName, string userName, string password, string locationName, InstanceSize? instanceSize)
     : this(os, name, serviceName, imageName, userName, password, locationName)
 {
     if (instanceSize.HasValue)
     {
         cmdletParams.Add(new CmdletParam("InstanceSize", instanceSize.ToString()));
     }               
 }
开发者ID:ranjitk9,项目名称:azure-sdk-tools,代码行数:8,代码来源:NewAzureQuickVMCmdletInfo.cs


示例16: DeathRowRecordRemovalMission

 public DeathRowRecordRemovalMission(string firstName, string lastName, OS _os)
 {
     os = _os;
     fname = firstName;
     lname = lastName;
     var computer = Programs.getComputer(os, "deathRow");
     deathRowDatabase = computer;
     container = computer.getFolderFromPath("dr_database/Records", false);
 }
开发者ID:strangea,项目名称:OpenHacknet,代码行数:9,代码来源:DeathRowRecordRemovalMission.cs


示例17: AzureProvisioningConfigInfo

 public AzureProvisioningConfigInfo(OS os, CertificateSettingList certs, string password)
 {
     this.OS = os;
     this.Password = password;
     foreach (CertificateSetting cert in certs)
     {
         Certs.Add(cert);
     }
 }
开发者ID:OctopusDeploy,项目名称:azure-sdk-tools,代码行数:9,代码来源:AzureProvisioningConfigInfo.cs


示例18: OSDependent

 /// <summary>Static constructor to setup OSVersion</summary>
 static OSDependent() {
   int p = (int) Environment.OSVersion.Platform;
   if ((p == 4) || (p == 128)) {
     OSVersion = OS.Linux;
   }
   else {
     OSVersion = OS.Windows;
   }
 }
开发者ID:johnynek,项目名称:brunet,代码行数:10,代码来源:OSDependent.cs


示例19: NewAzureQuickVMCmdletInfo

 public NewAzureQuickVMCmdletInfo(OS os, string name, string serviceName, string imageName, string userName,
     string password, string locationName, string instanceSize, string disableWinRMHttps)
     : this(os, name, serviceName, imageName, userName, password, locationName, instanceSize)
 {
     if (!string.IsNullOrEmpty(disableWinRMHttps))
     {
         cmdletParams.Add(new CmdletParam("DisableWinRMHttps",disableWinRMHttps));
     }
 }
开发者ID:B-Rich,项目名称:azure-sdk-tools,代码行数:9,代码来源:NewAzureQuickVMCmdletInfo.cs


示例20: TraceDangerSequence

 public TraceDangerSequence(ContentManager content, SpriteBatch sb, Rectangle fullscreenRect, OS os)
 {
     titleFont = GuiData.titlefont;
     bodyFont = GuiData.font;
     fullscreen = fullscreenRect;
     spriteBatch = sb;
     scaleupSpriteBatch = new SpriteBatch(sb.GraphicsDevice);
     this.os = os;
     spinDownSound = os.content.Load<SoundEffect>("Music/Ambient/spiral_gauge_down");
     spinUpSound = os.content.Load<SoundEffect>("Music/Ambient/spiral_gauge_up");
 }
开发者ID:strangea,项目名称:OpenHacknet,代码行数:11,代码来源:TraceDangerSequence.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# OSAEMethod类代码示例发布时间:2022-05-24
下一篇:
C# OPERAND_SIZE类代码示例发布时间: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