示例#1
0
    static void Main()
    {
        Sc sc = new Sc();

        int[]   s  = sc.Ia;
        int[][] a  = new int[s[1] + 1][];
        int[]   h  = new int[s[0] + 2];
        St      st = new St(1, s[0]);

        for (int i = 1; i <= s[1]; i++)
        {
            a[i] = sc.Ia;
            h[a[i][0]]++;
            h[a[i][1] + 1]--;
        }
        for (int i = 1; i <= s[0]; i++)
        {
            h[i] += h[i - 1];
            st.Ud(i, h[i]);
        }
        List <int> li = new List <int>();

        for (int i = 1; i <= s[1]; i++)
        {
            if (st.Get(a[i][0], a[i][1]).d > 1)
            {
                li.Add(i);
            }
        }
        Console.WriteLine(li.Count);
        if (li.Count != 0)
        {
            Console.WriteLine(String.Join("\n", li));
        }
    }
示例#2
0
        public static List <User> Get()
        {
            List <User> list = UnicornCache.Get <List <User> >(CacheKey.User);

            if (list == null)
            {
                list = new List <User>();
                string    sql = "select Id,UserName,Password,RealName,RoleType,Status,LeaveTime,bugzillaid from Users";
                DataTable dt  = ProjectDB.GetDt(sql);
                foreach (DataRow row in dt.Rows)
                {
                    User o = new User();
                    o.Id         = St.ToInt32(row["Id"], 0);
                    o.UserName   = row["UserName"].ToString();
                    o.Password   = row["Password"].ToString();
                    o.RealName   = row["RealName"].ToString();
                    o.RoleType   = St.ToInt32(row["RoleType"], 0);
                    o.Status     = St.ToInt32(row["Status"], 0);
                    o.LeaveTime  = St.ToDateTime(row["LeaveTime"].ToString());
                    o.BugzillaId = St.ToInt32(row["bugzillaid"], 0);
                    list.Add(o);
                }
                UnicornCache.Add(CacheKey.User, list);
            }

            return(list);
        }
示例#3
0
 public Club(string ClubName, string StreetAddress, Ci City, St State)
 {
     this.ClubName      = ClubName;
     this.StreetAddress = StreetAddress;
     this.City          = City;
     this.State         = State;
 }
示例#4
0
        static void Main(string[] args)
        {
            string test = @"C:\Users\dotnet\Downloads\torr.torrent";

            Console.WriteLine("Torrent file path:");
            String torrentfile = test;

            TorrentFile torrent = Bencode.DecodeTorrentFile(torrentfile);

            Console.WriteLine("Info in torrentfile:");
            Console.WriteLine(torrent.Announce);
            foreach (var St in torrent.AnnounceList)
            {
                Console.WriteLine(St.ToString());
            }
            Console.WriteLine(torrent.Comment);
            Console.WriteLine(torrent.CreatedBy);
            Console.WriteLine(torrent.CreationDate);
            Console.WriteLine(torrent.Encoding);

            BDictionary info  = (BDictionary)torrent["info"];
            BList       files = (BList)info["files"];

            foreach (BDictionary v in files)
            {
                BList path = (BList)v["path"];

                Console.WriteLine("Path: {0}, length: {1}", path[0], v["length"]);
            }

            Console.ReadLine();
        }
示例#5
0
        public static List <Server> Get()
        {
            List <Server> list = new List <Server>();
            string        sql  = "SELECT [Id] ,[ServerName],[UserName] ,[Password],[IISVersion],[SqlVersion],[ProjectId],[AddTime],[OSName],[ServerType] FROM [dbo].[Servers]";

            DataTable      dt = ProjectDB.GetDt(sql);
            List <Project> lp = ProjectRule.Get();

            foreach (DataRow row in dt.Rows)
            {
                Server o = new Server();
                o.Id          = St.ToInt32(row["Id"], 0);
                o.ServerName  = row["ServerName"].ToString();
                o.UserName    = row["UserName"].ToString();
                o.Password    = row["Password"].ToString();
                o.IISVersion  = row["IISVersion"].ToString();
                o.SqlVersion  = row["SqlVersion"].ToString();
                o.ProjectId   = row["ProjectId"].ToString();
                o.ProjectName = o.ProjectId == ""?"":string.Join(",", lp.Where(a => Array.IndexOf(o.ProjectId.Split(','), a.Id.ToString()) >= 0).Select(a => a.Name).ToArray());
                o.AddTime     = St.ToDateTime(row["AddTime"].ToString());
                o.OSName      = row["OSName"].ToString();
                o.ServerType  = row["ServerType"].ToString();
                list.Add(o);
            }
            return(list);
        }
示例#6
0
        public static List <Project> Get()
        {
            List <Project> list = UnicornCache.Get <List <Project> >(CacheKey.Project);

            if (list == null)
            {
                list = new List <Project>();
                string    sql = "select Id,Name,ParentId,Url,TestUrl,SiteFileName,DatabaseName,TestUserName,TestPassword,Remark,IsShow from Projects order by Id desc";
                DataTable dt  = ProjectDB.GetDt(sql);

                foreach (DataRow row in dt.Rows)
                {
                    Project o = new Project();
                    o.Id           = St.ToInt32(row["Id"], 0);
                    o.Name         = row["Name"].ToString();
                    o.Url          = row["Url"].ToString();
                    o.ParentId     = St.ToInt32(row["ParentId"], 0);
                    o.TestUrl      = row["TestUrl"].ToString();
                    o.SiteFileName = row["SiteFileName"].ToString();
                    o.DatabaseName = row["DatabaseName"].ToString();
                    o.TestUserName = row["TestUserName"].ToString();
                    o.TestPassword = row["TestPassword"].ToString();
                    o.Remark       = row["Remark"].ToString();
                    o.IsShow       = St.ToInt32(row["IsShow"], 0);
                    list.Add(o);
                }
                UnicornCache.Add(CacheKey.Project, list);
            }

            return(list);
        }
示例#7
0
    static void Main()
    {
        Sc  sc = new Sc();
        int n  = sc.I;

        int[] a   = sc.Ia;
        long  ans = 0;

        long[] h = new long[n + 1];
        for (int i = 0; i < n; i++)
        {
            h[a[i]] = i;
        }
        St stmax = new St(0, n - 1, 0);
        St stmin = new St(0, n - 1, 1);

        for (int i = 1; i <= n; i++)
        {
            long q = stmax.Get(0, (int)h[i]).n;
            long p = stmin.Get((int)h[i], n - 1).n;
            p    = p == -1?n:p;
            ans += (h[i] - q) * (p - h[i]) * i;
            stmax.Ud((int)h[i], h[i]);
            stmin.Ud((int)h[i], h[i]);
        }
        Console.WriteLine(ans);
    }
示例#8
0
    //Лице на трапец
    private void Trap()
    {
        instr.text = "Намерете лицето";
        Tra.SetActive(true);
        int a;
        int b;
        int hb;
        int S;
        int Sf;
        int St;

        do
        {
            a  = Random.Range(2, 10);
            b  = Random.Range(2, 10);
            hb = Random.Range(2, 10);
            S  = (a + b) * hb;
            St = S / 2;
            Sf = Random.Range(St - 10, St + 10);
        }while (St == Sf && Sf <= 0 && S % 2 != 0);

        quest.text = "b=" + b + "; \n" + "a=" + a + "; hb=" + hb;
        tr.text    = St.ToString();
        fal.text   = Sf.ToString();
    }
        private void St_Completed(object sender, EventArgs e)
        {
            var r = Rand.Next(AllSayings.Length);

            Message.Text = AllSayings[r];
            St.Begin(Message);
        }
示例#10
0
        public void EnterRolling(bool GameOver)
        {
            State       = St.Rolling;
            Dx          = -.005;
            Dy          = 0;
            Ax          = 0;
            Ay          = 0;
            H           = 0;
            Rx          = 3;
            OverBarrier = false;
            AbsoluteLayout.SetLayoutFlags(this, AbsoluteLayoutFlags.All);
            AbsoluteLayout.SetLayoutBounds(this, new Rectangle(1.2, 0.99, MainPage.BALLSIZE / MainPage.SCRRATIO, MainPage.BALLSIZE));
            if (GameOver)
            {
                Dy    = MainPage.rnd.NextDouble() * -0.6;
                Dx   *= 1 + Dy;
                State = St.Demo;

                Dx *= 1.5;
                Rx *= 1.5;
            }
            //AbsoluteLayout.SetLayoutBounds(b, new Rectangle(.5, 1, MainPage.BALLSIZE / MainPage.SCRRATIO , MainPage.BALLSIZE)); b.Dx = 0;

            AbsoluteLayout.SetLayoutFlags(Shadow, AbsoluteLayoutFlags.All);
        }
示例#11
0
        public static List <Dic> Get()
        {
            List <Dic> list = UnicornCache.Get <List <Dic> >(CacheKey.Dic);

            if (list == null)
            {
                list = new List <Dic>();
                string    sql = "select Id,Code,Name,Type,Remark,AddTime from Dics";
                DataTable dt  = ProjectDB.GetDt(sql);
                foreach (DataRow row in dt.Rows)
                {
                    Dic o = new Dic();
                    o.Id      = St.ToInt32(row["Id"], 0);
                    o.Code    = row["Code"].ToString();
                    o.Name    = row["Name"].ToString();
                    o.Type    = St.ToInt32(row["Type"].ToString(), 0);
                    o.Remark  = row["Remark"].ToString();
                    o.AddTime = St.ToDateTime(row["AddTime"].ToString());
                    list.Add(o);
                }
                UnicornCache.Add(CacheKey.Dic, list);
            }

            return(list);
        }
示例#12
0
        private static List <WeekReport> GetList(DataTable dt)
        {
            List <WeekReport> list = new List <WeekReport>();
            List <User>       lu   = UserRule.Get();

            foreach (DataRow row in dt.Rows)
            {
                WeekReport o = new WeekReport();
                o.Id              = St.ToInt32(row["Id"], 0);
                o.ProjectName     = row["ProjectName"].ToString();
                o.WorkContent     = row["WorkContent"].ToString();
                o.WorkType        = St.ToInt32(row["WorkType"], 0);
                o.WorkTypeStr     = GetWorkType(o.WorkType);
                o.PlanDateStart   = St.ToDateTime(row["PlanDateStart"].ToString());
                o.PlanDateEnd     = St.ToDateTime(row["PlanDateEnd"].ToString());
                o.PlanDay         = St.ToInt32(row["PlanDay"], 0);
                o.RealDay         = St.ToInt32(row["RealDay"], 0);
                o.RealWorkContent = row["RealWorkContent"].ToString();
                o.Status          = St.ToInt32(row["Status"], 0);
                o.StatusStr       = o.Status == 0 ? "未完成" : "完成";
                o.UserId          = St.ToInt32(row["UserId"], 0);
                o.User            = o.UserId == 0 ? new User() : lu.FirstOrDefault(a => a.Id == o.UserId);
                o.Remark          = row["Remark"].ToString();
                o.AddTime         = St.ToDateTime(row["AddTime"].ToString());

                list.Add(o);
            }
            return(list);
        }
示例#13
0
        public static User Get(string username)
        {
            string   sql = "select Id,UserName,Password,RealName,RoleType,Status,bugzillaid from Users where UserName=@UserName";
            SqlParam p   = new SqlParam();

            p.AddParam("@UserName", username, SqlDbType.VarChar, 100);
            DataTable dt = ProjectDB.GetDt(sql, p);

            if (St.CheckDt(dt))
            {
                User o = new User();
                o.Id         = St.ToInt32(dt.Rows[0]["Id"], 0);
                o.UserName   = dt.Rows[0]["UserName"].ToString();
                o.Password   = dt.Rows[0]["Password"].ToString();
                o.RealName   = dt.Rows[0]["RealName"].ToString();
                o.RoleType   = St.ToInt32(dt.Rows[0]["RoleType"], 0);
                o.Status     = St.ToInt32(dt.Rows[0]["Status"], 0);
                o.BugzillaId = St.ToInt32(dt.Rows[0]["bugzillaid"], 0);
                return(o);
            }
            else
            {
                return(new User());
            }
        }
        protected DataTable GetList()
        {
            string start = St.ToDateTime(txtStart.Value).ToString("yyyy-MM-dd 00:00:00");
            string end   = St.ToDateTime(txtEnd.Value).ToString("yyyy-MM-dd 23:59:59");
            string sql   = "select reporter,count(bug_id) as cc from bugs where creation_ts between '" + start + "' and '" + end + "' and resolution in('DUPLICATE','FIXED','LATER','MOVED','REMIND','WONTFIX','WORKSFORME') group by reporter";
            var    dt    = Common.DB.MySqlHelper.GetDataSet(System.Data.CommandType.Text, sql).Tables[0];

            return(dt);
        }
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            var    bugsurl   = System.Configuration.ConfigurationManager.AppSettings["BugzillaUrl"];
            string start     = St.ToDateTime(txtStart.Value).ToString("yyyy-MM-dd");
            string end       = St.ToDateTime(txtEnd.Value).ToString("yyyy-MM-dd");
            var    urlformat = bugsurl + "/buglist.cgi?chfield=%5BBug%20creation%5D&chfieldfrom=" + start + "&chfieldto=" + end + "&f1=reporter_realname&o1=equals&query_format=advanced&resolution=FIXED&resolution=WONTFIX&resolution=LATER&resolution=REMIND&resolution=DUPLICATE&resolution=WORKSFORME&resolution=MOVED&v1=";

            rpt.DataSource = GetList().AsEnumerable().Select(a => new { Name = GetBugzillaUserName(a.Field <int>("reporter")), CC = a.Field <Int64>("cc"), Link = urlformat + GetBugzillaUserName(a.Field <int>("reporter")) }).Where(a => a.Name != "");
            rpt.DataBind();
        }
示例#16
0
        public static void Update(int id, string username, string password)
        {
            string   sql = @"update Users set Password=@Password where Id=@id";
            SqlParam p   = new SqlParam();

            p.AddParam("@id", id, SqlDbType.Int, 0);
            p.AddParam("@Password", St.GetMd5(username + password), SqlDbType.VarChar, 100);
            ProjectDB.SqlExecute(sql, p);
            UnicornCache.Remove(CacheKey.User);
        }
示例#17
0
 public bool EnterOut(Rectangle r)
 {
     State = St.Out;
     Dx    = r.X < .5 ? -.025 : .025;
     Dy    = 0;
     if ((r.X < .2 && r.X > .17) || (r.X > .8 && r.X < .83))
     {
         return(true);
     }
     return(false);
 }
示例#18
0
        public void EnterShoot(double diff, double diffY)
        {
            State = St.Shoot;
            Ax    = Math.Abs(diff) > .1 ? diff / 25 : 0;
            var r = AbsoluteLayout.GetLayoutBounds(this);

            Dx = (.5 - r.X) * .015;
            Dy = -.02;
            Ay = Math.Max(0, Math.Min(0.005, 0.001 - diffY / 100));
            Rx = 2;
        }
示例#19
0
        /// <summary>
        /// function to get list of suspended student
        /// </summary>
        /// <returns>suspendedStudent</returns>
        public List <Student> ListofSuspendedStudents()
        {
            List <Student> suspendedStudent = new List <Student>();

            foreach (Student St in studentList)
            {
                if (St.getCGPA() < 2.0)
                {
                    suspendedStudent.Add(St);
                }
            }
            return(suspendedStudent);
        }
示例#20
0
 public void PosLaunch(int pos)
 {
     FixedPos    = pos;
     State       = St.Rolling;
     TimePos     = DateTime.Now.Ticks;
     Dx          = 0;
     Dy          = 0;
     Ax          = 0;
     Ay          = 0;
     H           = 0;
     Rx          = 3;
     OverBarrier = false;
     AbsoluteLayout.SetLayoutFlags(this, AbsoluteLayoutFlags.All);
     AbsoluteLayout.SetLayoutBounds(this, new Rectangle(.02 + pos * 0.96 / 3.0, 0.99, MainPage.BALLSIZE / MainPage.SCRRATIO, MainPage.BALLSIZE));
     AbsoluteLayout.SetLayoutFlags(Shadow, AbsoluteLayoutFlags.All);
 }
示例#21
0
        public static void Add(string username, string realname, int userrole, DateTime leavetime, int bugzillaid)
        {
            string   sql = @" if exists(select Id from Users where UserName=@UserName)
	                            update Users set RealName=@RealName,RoleType=@RoleType,LeaveTime=@LeaveTime,bugzillaid=@bugzillaid where UserName=@UserName
                            else
	                            insert into Users(UserName,Password,RealName,RoleType,Status,LeaveTime,bugzillaid) values(@UserName,@Password,@RealName,@RoleType,1,@LeaveTime,@bugzillaid)"    ;
            SqlParam p   = new SqlParam();

            p.AddParam("@UserName", username, SqlDbType.VarChar, 100);
            p.AddParam("@RealName", realname, SqlDbType.VarChar, 500);
            p.AddParam("@RoleType", userrole, SqlDbType.Int, 0);
            p.AddParam("@Password", St.GetMd5(username + "123456"), SqlDbType.VarChar, 100);
            p.AddParam("@LeaveTime", leavetime, SqlDbType.DateTime, 0);
            p.AddParam("@bugzillaid", bugzillaid, SqlDbType.Int, 0);
            ProjectDB.SqlExecute(sql, p);
            UnicornCache.Remove(CacheKey.User);
        }
示例#22
0
        protected void btnLogin_Click(object sender, EventArgs e)
        {
            string username = UserName.Value.Trim();
            string password = Password.Value;

            Model.User u = DAL.UserRule.Get(username);
            if (u.Password == St.GetMd5(username + password) && u.Status == 1)
            {
                Session["user"] = u;
                St.SetCookie("user", u.UserName, DateTime.Now.AddYears(1));
                St.SetCookie("user2", u.Password, DateTime.Now.AddYears(1));
                Response.Redirect("Default.aspx");
            }
            else
            {
                divError.Visible = true;
            }
        }
示例#23
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (ActionId != 0)
            {
                hash ^= ActionId.GetHashCode();
            }
            if (UserId != 0L)
            {
                hash ^= UserId.GetHashCode();
            }
            if (MsgId != 0)
            {
                hash ^= MsgId.GetHashCode();
            }
            if (Token.Length != 0)
            {
                hash ^= Token.GetHashCode();
            }
            if (St != 0L)
            {
                hash ^= St.GetHashCode();
            }
            if (Content.Length != 0)
            {
                hash ^= Content.GetHashCode();
            }
            if (Sign.Length != 0)
            {
                hash ^= Sign.GetHashCode();
            }
            if (ErrorCode != 0)
            {
                hash ^= ErrorCode.GetHashCode();
            }
            if (ErrorInfo.Length != 0)
            {
                hash ^= ErrorInfo.GetHashCode();
            }
            return(hash);
        }
示例#24
0
        public static List <Attentions> Get()
        {
            List <Attentions> list = new List <Attentions>();
            string            sql  = "SELECT [Id] ,[Remark],[ProjectId],[AddTime] FROM [dbo].[Attentions] order by Id desc";

            DataTable      dt = ProjectDB.GetDt(sql);
            List <Project> lp = ProjectRule.Get();

            foreach (DataRow row in dt.Rows)
            {
                Attentions o = new Attentions();
                o.Id          = St.ToInt32(row["Id"], 0);
                o.Remark      = row["Remark"].ToString();
                o.ProjectId   = row["ProjectId"].ToString();
                o.ProjectName = o.ProjectId == "" ? "" : string.Join(",", lp.Where(a => Array.IndexOf(o.ProjectId.Split(','), a.Id.ToString()) >= 0).Select(a => a.Name).ToArray());
                o.AddTime     = St.ToDateTime(row["AddTime"].ToString());
                list.Add(o);
            }
            return(list);
        }
示例#25
0
    static void Main()
    {
        Sc sc = new Sc();

        int[]   s = sc.Ia;
        int[][] a = new int[s[0]][];
        if (s[1] == 1)
        {
            Console.WriteLine(s[0]); return;
        }
        int[]  h  = new int[s[0]];
        bool[] b  = new bool[s[1] + 1];
        St     st = new St(1, s[1], true);

        for (int i = 0; i < s[0]; i++)
        {
            a[i] = sc.Ia;
            st.Ud(a[i][0], 1);
        }
        long ans = Math.Min(s[0], st.Get(1, s[1]).d);

        for (int k = 0; k < s[1] - 1; k++)
        {
            int q = st.Get(1, s[1]).n;
            st.Ud(q, -st.Get(1, s[1]).d);
            b[q] = true;
            for (int i = 0; i < s[0]; i++)
            {
                if (a[i][h[i]] == q)
                {
                    while (b[a[i][h[i]]])
                    {
                        h[i]++;
                    }
                    st.Ud(a[i][h[i]], 1);
                }
            }
            ans = Math.Min(ans, st.Get(1, s[1]).d);
        }
        Console.WriteLine(ans);
    }
        public static List <WorkPlanFile> GetList(int workplanid)
        {
            string   sql = "select Id,WorkPlanId,FileName,FilePath from WorkPlanFiles where WorkPlanId = @workplanid order by Id desc";
            SqlParam p   = new SqlParam();

            p.AddParam("@workplanid", workplanid, SqlDbType.Int, 0);
            DataTable dt = ProjectDB.GetDt(sql, p);

            List <WorkPlanFile> list = new List <WorkPlanFile>();

            foreach (DataRow row in dt.Rows)
            {
                WorkPlanFile o = new WorkPlanFile();
                o.Id         = St.ToInt32(row["Id"], 0);
                o.WorkPlanId = St.ToInt32(row["WorkPlanId"], 0);
                o.FileName   = row["FileName"].ToString();
                o.FilePath   = row["FilePath"].ToString();
                list.Add(o);
            }
            return(list);
        }
        public static WorkPlanFile Get(int id)
        {
            string   sql = "select Id,WorkPlanId,FileName,FilePath from WorkPlanFiles where Id = @Id";
            SqlParam p   = new SqlParam();

            p.AddParam("@Id", id, SqlDbType.Int, 0);
            DataTable dt = ProjectDB.GetDt(sql, p);

            WorkPlanFile o = new WorkPlanFile();

            if (dt.Rows.Count > 0)
            {
                var row = dt.Rows[0];

                o.Id         = St.ToInt32(row["Id"], 0);
                o.WorkPlanId = St.ToInt32(row["WorkPlanId"], 0);
                o.FileName   = row["FileName"].ToString();
                o.FilePath   = row["FilePath"].ToString();
            }
            return(o);
        }
示例#28
0
    static void Main()
    {
        Sc  sc = new Sc();
        int n  = sc.I;

        int[][] a = new int[n][];
        int[]   g = new int[n];
        int[]   h = new int[n];
        int     ans = 0, m = 0;
        St      st = new St(0, n - 1);

        st.Ud(0, 0);
        for (int i = 1; i < n; i++)
        {
            a[i] = sc.Ia;
            int lb = -1, ub = m + 1, mid = 0;
            while (ub - lb > 1)
            {
                mid = (ub + lb) / 2;
                if (st.Get(0, mid).d < i - a[i][0])
                {
                    ub = mid;
                }
                else
                {
                    lb = mid;
                }
            }
            g[i] = ub;
            m    = Math.Max(m, ub);

            h[g[i]] = i;
            st.Ud(g[i], i);
            if (a[i][1] % 2 == 1)
            {
                ans ^= g[i];
            }
        }
        Console.WriteLine("{0}", ans != 0?"First":"Second");
    }
示例#29
0
        public PatientInformationRecord()
        {
            log.Debug("PatientInformationRecord:ctor");

            _type = (string)RecordId.PatientInformationRecord;
            _sequence = 0;
            _practice = String.Empty;
            _laboratory = String.Empty;
            _patient = String.Empty;
            _patient_name = String.Empty;
            _mothers_name = String.Empty;
            _birthdates = String.Empty;
            _sex = String.Empty;
            _race = String.Empty;
            _address = String.Empty;
            _reserved = String.Empty;
            _phone = String.Empty;
            _physician = String.Empty;
            _special = String.Empty;

            InitializeMemberList();
        }
示例#30
0
        /// <summary>
        /// Get FileName according to specific formula
        /// </summary>
        /// <param name="Formula">Formula to make FileName</param>
        /// <returns>System.String contain FileName according to formula or String.Empty</returns>
        public string MakeFileName(string Formula)
        {
            string FileName = "";

            Formula = Formula.Replace("<", "<;");
            string ID;

            foreach (string St in Formula.Split('>', '<'))
            {
                if (St.StartsWith(";"))
                {
                    ID = St.Remove(0, 1).ToUpper();
                    if (ID.StartsWith("TRCK"))
                    {
                        string TRCK = TrackNumber;
                        if (ID.Length == 5)
                        {
                            int Digits = int.Parse(ID[4].ToString());

                            while (Digits-- > TrackNumber.Length)
                            {
                                FileName += "0";
                            }
                        }
                        FileName += TRCK;
                    }
                    else
                    {
                        FileName += GetTextFrame(ID);
                    }
                }
                else
                {
                    FileName += St;
                }
            }

            return(FileName + ".mp3");
        }
        public static void Save(string Output)
        {
            System.Windows.Media.Imaging.GifBitmapEncoder G = new System.Windows.Media.Imaging.GifBitmapEncoder();

            List <System.IO.FileStream> X = new List <System.IO.FileStream>();

            foreach (string Fi in Directory.GetFiles(tempDir, "*.png", SearchOption.TopDirectoryOnly))
            {
                System.IO.FileStream TempStream = new System.IO.FileStream(Fi, System.IO.FileMode.Open);
                System.Windows.Media.Imaging.BitmapFrame Frame = System.Windows.Media.Imaging.BitmapFrame.Create(TempStream);
                X.Add(TempStream);
                G.Frames.Add(Frame);
            }
            System.IO.FileStream FS = new System.IO.FileStream(Output, System.IO.FileMode.OpenOrCreate);
            G.Save(FS);
            FS.Close();

            foreach (System.IO.FileStream St in X)
            {
                St.Close();
            }
        }
示例#32
0
        public RequestInformationRecord()
        {
            log.Debug("RequestInformationRecord:ctor");

            _type = String.Empty;
            _sequence = 0;
            _starting_range = new Cm();
            _endng_range = String.Empty;
            _universal_test = String.Empty;
            _nature_of_request = String.Empty;
            _beginning_request = String.Empty;
            _ending_request = String.Empty;
            _requestin_name = String.Empty;
            _requesting_phone = String.Empty;
            _user_1 = String.Empty;
            _user_2 = String.Empty;
            _request_information_status = String.Empty;

            InitializeCm("StartingRange", this.GetType(), _starting_range);

            InitializememberList();
        }
示例#33
0
        private MessageHeaderRecord()
        {
            log.Debug("MessageHeaderRecord:ctor");

            _type = (string)RecordId.MessageHeaderRecord;
            _delimiter = "\\^&";
            _message_id = String.Empty;
            _password = String.Empty;
            _sender = new Cm();
            _address = String.Empty;
            _reserved = String.Empty;
            _phone = String.Empty;
            _characteristics = String.Empty;
            _receiver = String.Empty;
            _comments = new Cm();
            _processing = "P";
            _version = 1;
            _timestamp = String.Empty;

            InitializeCm("Sender", this.GetType(), _sender);
            InitializeCm("Comments", this.GetType(), _comments);

            InitializeMemberList();
        }
示例#34
0
        public ResultRecord()
        {
            log.Debug("RequestInformationRecord:ctor");

            _type = (string)RecordId.ResultRecord;
            _sequence = 0;
            _test = new Cm();
            _value = new Cm();
            _units = String.Empty;
            _reference_ranges = String.Empty;
            _abnormal = String.Empty;
            _nature = String.Empty;
            _result_status = String.Empty;
            _normative_changed = String.Empty;
            _operator = String.Empty;
            _test_started = String.Empty;
            _test_completed = String.Empty;
            _instrument_identification = "E1";

            InitializeCm("Test", this.GetType(), _test);
            InitializeCm("Value", this.GetType(), _value);

            InitializememberList();
        }
示例#35
0
        public TestOrderRecord()
        {
            log.Debug("TestOrderRecord:ctor");

            _type = (string)RecordId.TestOrderRecord;
            _sequence = 0;
            _sample_id = String.Empty;
            _instrument = new Cm();
            _test = new Cm();
            _priority = String.Empty;
            _created_at = String.Empty;
            _sampled_at = new DateTime();
            _collected_at = String.Empty;
            _volume = String.Empty;
            _collector = String.Empty;
            _action_code = String.Empty;
            _danger_code = String.Empty;
            _clinical_info = String.Empty;
            _delivered_at = String.Empty;
            _biomaterial = 0;
            _physician = String.Empty;
            _physician_phone = String.Empty;
            _user_field_1 = String.Empty;
            _user_field_2 = String.Empty;
            _laboratory_field_1 = String.Empty;
            _laboratory_field_2 = String.Empty;
            _modified_at = new DateTime();
            _instrument_charge = String.Empty;
            _instrument_section = String.Empty;
            _report_type = String.Empty;
            _reserved = String.Empty;
            _location_ward = String.Empty;
            _infection_flag = String.Empty;
            _specimen_service = String.Empty;
            _laboratory = String.Empty;

            InitializeCm("Instrument", this.GetType(), _instrument);
            //InitializeCm("Test", this.GetType(), _test);

            InitializememberList();
        }